我有一个运行良好的Jenkins Master的自动化测试脚本,但在从属服务器上却显示以下错误:
11:47:50 [ERROR] Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners (generateRunners) on project riverbed-automation-tests: Unable to parse configuration of mojo com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners for parameter tags: Cannot assign configuration entry 'tags' with value '"~@ignored"' of type java.lang.String to property of type java.util.List -> [Help 1]
11:47:50 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners (generateRunners) on project riverbed-automation-tests: Unable to parse configuration of mojo com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners for parameter tags: Cannot assign configuration entry 'tags' with value '"~@ignored"' of type java.lang.String to property of type java.util.List
11:47:50 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:221)
11:47:50 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
11:47:50 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
11:47:50 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
11:47:50 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
11:47:50 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
11:47:50 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
11:47:50 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
11:47:50 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
11:47:50 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
11:47:50 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
11:47:50 at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
11:47:50 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:47:50 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:47:50 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:47:50 at java.lang.reflect.Method.invoke(Method.java:498)
11:47:50 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
11:47:50 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
11:47:50 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
11:47:50 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
此Cucumber
java
junit
项目与Serenity
。主服务器和从服务器之间的唯一区别是Xvfb
(无头浏览器)在主服务器上可以运行,而在从服务器上却不能,但是由于它看起来是Maven或Cucumber错误,因此我怀疑Xvfb
与它有任何关系。>
我在做什么错了?
答案 0 :(得分:1)
检查https://github.com/temyers/cucumber-jvm-parallel-plugin 声明:
从cucumber-jvm:4.0.0开始,并行执行本机支持 黄瓜。因此,建议升级到Cucumber 4.0.0,这 插件不再维护。
所以请考虑离开黄瓜-jvm-parallel-plugin
您的pom.xml
中好像有
<tags>"~@ignore"</tags>
尝试将其更改为
<tags>
<tag>~@ignore</tag>
</tags>
BTW适当的新样式现在not @ignore
选中https://github.com/cucumber/cucumber/tree/master/tag-expressions#migrating-from-old-style-tags
答案 1 :(得分:0)
问题是Maven版本
maven 3.3.9
及更高版本支持列表/集合的以下格式,但在较低版本中不支持。
<tags>val1,val2,val3...</tags>
但是在小于3.3.9
的Maven版本中,不支持以上版本
要进行修复,使其向后兼容
<tags>
<tag>val1</tag>
<tag>val2</tag>
.....
</tags>
PS:有关更多详细信息,请检查this链接