简体   繁体   English

运行单个Grails单元/集成测试将在Intellij上运行所有测试

[英]Run single Grails unit/integration test will run all the tests on Intellij

Sometimes, when I run a single Grails unit or integration test on Intellij (latest version), it will run all the tests in the console. 有时,当我在Intellij(最新版本)上运行单个Grails单元或集成测试时,它将在控制台中运行所有测试。

What I do is right click single unit test class or method in the code and select run. 我要做的是右键单击代码中的单个单元测试类或方法,然后选择运行。

Sometimes it happened but sometimes it is OK. 有时发生了,但有时还可以。

Anyone has idea how to fix or prevent this happen? 任何人都知道如何解决或防止这种情况发生吗?

This could be IntellijIdea issue. 这可能是IntellijIdea问题。 I'd suggest to use grails command prompt for testing. 我建议使用grails命令提示符进行测试。 Just use: 只需使用:

grails test-app unit: YourTestClass

or 要么

grails test-app integration: YourIntegrationTestClass 

This works for me. 这对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否可以从NetBeans运行grails单个grails单元测试类? - Is it possible to run a grails single grails unit test class from NetBeans? 单击测试在“全部运行”上失败,但未在“运行所选测试”中全部选中 - Unit Test fails on Run All but not on Run Selected Tests with all selected Maven-运行集成和单元测试 - Maven - run integration and unit tests 如何使用多个私有插件运行Grails应用程序的所有单元测试 - How to run all unit tests for Grails app with multi private plugins 单元测试在“全部运行”时失败,但在单次运行时通过 - Unit tests fail on Run All but pass when are run single 如何在grails 3中运行单个集成测试? - How do I run a single integration test in grails 3? Grails单元和集成使用Intellij IDE测试文件名冲突 - Grails unit & integration tests file name conflict using Intellij IDE 除了使用集成测试运行器在IntelliJ IDEA项目中以“IntegrationTest”结尾的所有JUnit单元测试之外,我该如何运行? - How can I run all JUnit unit tests except those ending in “IntegrationTest” in my IntelliJ IDEA project using the integrated test runner? Visual Studio不会在测试类中运行所有单元测试 - Visual Studio does not run all the unit tests in a test class 如何从测试 jar 运行所有单元测试? - How to run all unit-tests from a test jar?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM