我在使用surefire 2.18v时遇到问题,它无法正常工作并给出了错误。我使用的是surefire 2.6v,但是此版本出现堆空间问题,因此我更新为surefire 2.18v,但是与此同时我也遇到了问题。我尝试在网上搜索,但未找到正确的输入来解决问题。我将eclipse用于带有selenium webdriver的Java 1.7,Maven,TestNg,TestNG报告的测试项目。下面是错误的详细信息

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失败,并显示消息“分叉的VM终止而未正确说再见”。

Surefire随时不支持测试或任何引用的调用System.exit()的库。如果这样做,则说明它们与Surefire不兼容,您可能应该向磁带库/供应商提出问题。或者,由于多种原因,分支的VM也可能已崩溃。查找表明VM崩溃的经典“ hs_err *”文件,或者在执行测试时检查Maven日志输出。崩溃进程的某些“非凡”输出可能会转储到控制台/日志中。如果这是在CI环境中发生并且只有在运行了一段时间之后,您的测试套件很有可能会泄漏某种操作系统级别的资源,这会使每次运行情况变得更糟。常规的OS级监视工具可能会给您一些提示。

关于java - Surefire 2.18v,带有testng,mave和Selenium Webdriver,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28110930/

10-10 07:31