带有 testng、mave 和 selenium webdriver 的 Surefire 2.18v

Surefire 2.18v with testng, mave and selenium webdriver

我遇到了 surefire 2.18v 的问题,它无法正常工作并出现错误。我使用的是 surefire 2.6v,但是我遇到了这个版本的堆 space 问题,因此我更新到 surefire 2.18v,但是我也遇到了问题。我曾尝试在网上搜索,但没有找到解决问题的正确输入。我将 eclipse 用于 Java 1.7、Maven、TestNg、TestNG 报告和 selenium webdriver 的测试项目。以下是错误详情

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25:23.563s
[INFO] Finished at: Fri Jan 23 18:37:38 IST 2015
[INFO] Final Memory: 12M/1013M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on project ProjectTest: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C ""D:\Program Files\Java\jdk1.7.0_67\jre\bin\java" -jar "D:\Automation\Java Project\ProjectTest\target\surefire\surefirebooter297839004395456325.jar" "D:\Automation\Java Project\ProjectTest\target\surefire\surefire7250122540039248955tmp" "D:\Automation\Java Project\ProjectTest\target\surefire\surefire_06252333885408211489tmp""
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

非常感谢您的意见。

谢谢, 卡里姆

Apache 对此进行了记录 here。请看看这是否有帮助。

Surefire fails with the message "The forked VM terminated without properly saying goodbye".

Surefire does not support tests or any referenced libraries calling System.exit() at any time. If they do so, they are incompatible with Surefire and you should probably file an issue with the library/vendor. Alternatively the forked VM could also have crashed for a number of reasons. Look for the classical "hs_err*" files indicating VM crashes or examine the Maven log output when the tests execute. Some "extraordinary" output from crashing processes may be dumped to the console/log. If this happens on a CI environment and only after it runs for some time, there is a fair chance your test suite is leaking some kind of OS-level resource that makes things worse at every run. Regular OS-level monitoring tools may give you some indication.