【问题标题】:Run single Grails unit/integration test will run all the tests on Intellij运行单个 Grails 单元/集成测试将在 Intellij 上运行所有测试
【发布时间】:2014-04-02 00:22:35
【问题描述】:

有时,当我在 Intellij(最新版本)上运行单个 Grails 单元或集成测试时,它会在控制台中运行所有测试。

我所做的是右键单击代码中的单个单元测试类或方法并选择运行。

有时会发生,但有时没关系。

有人知道如何解决或防止这种情况发生吗?

【问题讨论】:

    标签: unit-testing grails intellij-idea


    【解决方案1】:

    这可能是 IntellijIdea 问题。我建议使用 grails 命令提示符进行测试。只需使用:

    grails test-app unit: YourTestClass
    

    grails test-app integration: YourIntegrationTestClass 
    

    这对我有用。

    【讨论】:

    • 我发现 grails 3.x 的命令行语法略有不同:“grails test-app -integration YourIntegrationTestSpec”
    猜你喜欢
    • 2011-07-11
    • 2013-10-17
    • 1970-01-01
    • 1970-01-01
    • 2013-07-29
    • 1970-01-01
    • 2023-01-09
    • 2015-09-05
    • 1970-01-01
    相关资源
    最近更新 更多