qase-tms / qase-java

Qase TMS Java SDK
https://developers.qase.io
Apache License 2.0
17 stars 5 forks source link

Test runs results are not publishing to Qase.io #106

Closed harshsal closed 10 months ago

harshsal commented 1 year ago

Hello!

Please find following details for the issue being faced while integrating Qase with the Selenium java.

Issue: Test run is not getting updated in Qase, as per the result of automation run

Preconditions:

  1. Selenium
  2. Java
  3. TestNG
  4. Maven

Followed the instructions described in the README.md:

  1. Added dependency io.qase with v3.0.4 in POM.xml file `

    io.qase
        <artifactId>qase-api</artifactId>
        <version>3.0.4</version>
    </dependency>`
  2. Added annotation as in https://github.com/qase-tms/qase-java/blob/982615cdffb7edcf47ecf6283d61ba735c7923bb/qase-testng/README.md#link-autotests-with-test-cases @Test(priority = 3, groups = { "specialscenario" }) @CaseId (2) public void login() throws IOException, InterruptedException, EmailException { System.out.println("success"); CommonMethods.staticTimeWait(10000); }

  3. Using following command for the execution mvn clean test -DdefaultSuiteFiles=src/test/resources/testng1.xml -DQASE_ENABLE=true -DQASE_PROJECT_CODE=ST -DQASE_RUN_ID=17 -DQASE_API_TOKEN=my-api-token (where testng1.xml is a runner file executing login() method from the TestNG class)

Results doesn't update in the Qase.io however no error after the run

savkk commented 1 year ago

Could you enable reporter debug mode? Add the next line to before-method : QaseClient.getApiClient().setDebugging(true);

It should give more information about errors.

harshsal commented 1 year ago

I added above line as per given suggestion and debug it in eclipse I am getting below details. It says required parameter is not entered, however I think it is expected as I am passing those required vaule in the command line as mentioned in the point 3 above. image

Please take a note that I am following it as per https://github.com/qase-tms/qase-java/blob/982615cdffb7edcf47ecf6283d61ba735c7923bb/qase-testng/README.md#link-autotests-with-test-cases. And 'CaseId' in the testNG annotation is depricated. image

savkk commented 1 year ago

could you check system properties from autotests, are QASE_PROJECT_CODE, QASE_RUN_ID, QASE_API_TOKEN properties available?

harshsal commented 1 year ago

Can you please explain what do you mean by autotests and where excatly to check the system properties? If you have any specific documents related to it then please share it so that I can refer to it.

savkk commented 1 year ago

you can get system properties from any test, for example print via sout:

    @Test
    void someTest() {
        System.out.println(System.getProperty("QASE_PROJECT_CODE"));
        ...
    }
stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.