如何从Docker容器运行Maven黄瓜测试?

时间:2019-02-14 10:09:05

标签: docker cucumber

我已经创建了一个docker镜像。 然后使用以下命令运行容器

docker run -it --rm api-automation:2.0 /bin/sh 

此打开的终端与容器对话。然后,我在命令下运行,但测试未运行,并且抛出异常。

mvn test

以下是例外

    [INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.

Please refer to /target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd / && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xmx1024m -XX:MaxPermSize=1024m -jar /target/surefire/surefirebooter5414261716307251022.jar /target/surefire 2019-02-14T10-03-50_041-jvmRun1 surefire1321906124726086844tmp surefire_01671615059458242589tmp
Error occurred in starting fork, check output in log
Process Exit Code: 1
org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd / && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xmx1024m -XX:MaxPermSize=1024m -jar /target/surefire/surefirebooter5414261716307251022.jar /target/surefire 2019-02-14T10-03-50_041-jvmRun1 surefire1321906124726086844tmp surefire_01671615059458242589tmp
Error occurred in starting fork, check output in log
Process Exit Code: 1
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.ja

0 个答案:

没有答案