ctco / zephyr-sync

Tool to synchronize test results to Zephyr (test management add-on for JIRA)
21 stars 28 forks source link

Unable to find Allure test cases #22

Open BenLittle opened 5 years ago

BenLittle commented 5 years ago

I am using the below POM plugin configuration, to push Allure test reports into our Zephyr plugin of the Jira board.

 <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>

There are test results in the target/allure-results/ directory.

When I run java:exec, the following output occurs:

[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

So I know it can communicate with Jira, and find the correct test cycle ID.

Then this exception is thrown (No Test Cases extracted from the Test Report):

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

I have also generated the test-report using allure, yet the same exception occurs.

Has anyone come across this issue before?

BenLittle commented 5 years ago

Does anyone know why this is failing please?

Alexdrs commented 5 years ago

Hi! faced with a similar problem, wanted to know if you managed to solve it?