我正在使用以下POM插件配置,将Allure测试报告推送到Jira板的Zephyr插件中。
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>lv.ctco.zephyr.Runner</mainClass>
<arguments>
<argument>--username=username</argument>
<argument>--password=password</argument>
<argument>--reportType=allure</argument>
<argument>--projectKey=ABC</argument>
<argument>--releaseVersion=ReleaseVersion</argument>
<argument>--jiraUrl=https://jira.company.com/rest/</argument>
<argument>--reportPath=${project.build.directory}/allure-results</argument>
<argument>--testCycle=Cycle</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
target/allure-results/
目录中有测试结果。
当我运行java:exec
时,将出现以下输出:
[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.
##### Supported report types: [junit, cucumber, nunit, allure]
##### POST: https://jira.company.com/rest/auth/1/session
##### GET: https://jira.company.com/rest/api/2/project/ABC
##### Retrieved project ID - 56660
##### Retrieved version ID - 87089
##### GET: https://jira.company.com/rest/zapi/latest/cycle?projectId=56660&versionId=87089
##### Retrieved target Test Cycle ID - 24232
所以我知道它可以与Jira通信,并找到正确的测试周期ID。
然后引发此异常(从测试报告中不提取测试用例):
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:293)
at java.lang.Thread.run (Thread.java:748)
Caused by: lv.ctco.zephyr.ZephyrSyncException: No Test Cases extracted from the Test Report
我还使用诱惑力生成了测试报告,但是发生了相同的异常。
以前有没有人遇到过这个问题?