“跳过surefire的执行,因为已经为此配置运行了它"? [英] "Skipping execution of surefire because it has already been run for this configuration"?
问题描述
请原谅newb问题-我的概念模型仍然很不完整...
Please excuse the newb question - my conceptual models are still quite incomplete...
我正在尝试使用maven和surefire从命令行重新执行TestNG测试.我的命令行如下所示:
I'm trying to re-execute TestNG tests from a command line using maven and surefire. My command line looks like:
D:\workspaces\workspace01\aptest>mvn clean install surefire:test -Dtests=myTestNGSuite test
很明显我没有得到它,因为最终得到的输出包括:
Clearly I'm not getting it because the output I end up with includes:
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ aptest ---
[INFO] Skipping execution of surefire because it has already been run for this configuration
如何清除配置,以便可以从命令行重新运行TestNG套件?有没有更好的方法可以从命令行运行TestNG套件?
How do I clear out the configuration so I can re-run my TestNG suite from the command line? Is there a better way to run TestNG suites from the command line?
TIA, ->亚伦
推荐答案
surefire插件的测试目标是在测试阶段自动运行的,因此第一次运行即可.
The test goal of the surefire plugin is automatically run in the test phase so the first time just run
mvn clean install -Dtest=MyTestNGTest
,然后如果要重新运行,请执行
and then if you want to re run do a
mvn install -Dtest=MyTestNGTest
请注意,我不会调用清理目标,以便仅重新编译您对测试用例或代码所做的更改,并且不会在调用surefire插件的测试目标.
Note that I am not calling the clean goal so that only your changes of test cases or code are recompiled and that I am NOT invoking the test goal of the surefire plugin.
这篇关于“跳过surefire的执行,因为已经为此配置运行了它"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!