I am trying to use Jenkins HP plugin to run tests from QC. When I run jobs are freestyle jobs, I am able to run "Execute HPE functional tests from HPE ALM" option and post that "Publish HPE tests result" option. Job is running fine and I am able to view the results. But when I am running with pipeline, I am able to run "runFromAlmBuilder" process successfully but "Publish HPE tests result" is not working. When I tried with Pipeline Syntax option to generate pipeline script, I am getting "step <object of type com.hpe.application.automation.tools.results.RunResultRecorder>" as result which Jenkins throwing error.

      Could you please guide me to fix issue with pipeline result publisher?

          [JENKINS-47166] new

          Eldo Joseph added a comment -

          evanchen, could you please let me know the solution as soon as possible? we are waiting for the fix.

          Eldo Joseph added a comment - evanchen , could you please let me know the solution as soon as possible? we are waiting for the fix.

          Anton Semenov added a comment - - edited

          evanchen , I have same problem.

          Jenkins ver. 2.89.4
          But we can execute the plugin by following code:

          stage('Publish results') {
              steps {
                  script {
                      step([$class: 'RunResultRecorder', archiveTestResultsMode:'Always archive HP test reports'])
                  }
              }
          }

          But it's not working. Here is error text:

          java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.Project

                  at com.hpe.application.automation.tools.results.RunResultRecorder.perform(RunResultRecorder.java:1242)

                  at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)

                  at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)

                  at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)

                  at hudson.security.ACL.impersonate(ACL.java:260)

                  at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

                  at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

                  at java.lang.Thread.run(Thread.java:748)

          Anton Semenov added a comment - - edited evanchen , I have same problem. Jenkins ver. 2.89.4 But we can execute the plugin by following code: stage( 'Publish results' ) {     steps {         script {             step( [$class: 'RunResultRecorder', archiveTestResultsMode:'Always archive HP test reports'] )         }     } } But it's not working. Here is error text: java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.Project         at com.hpe.application.automation.tools.results.RunResultRecorder.perform(RunResultRecorder.java:1242)         at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)         at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)         at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)         at hudson.security.ACL.impersonate(ACL.java:260)         at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)         at java.util.concurrent.FutureTask.run(FutureTask.java:266)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)         at java.lang.Thread.run(Thread.java:748)

          jack jack added a comment -

          We are also facing this the same issue, where we are not able to generate report after the test execution using pipeline job. Can you please advise workaround and when this issue will get fix.

          jack jack added a comment - We are also facing this the same issue, where we are not able to generate report after the test execution using pipeline job. Can you please advise workaround and when this issue will get fix.

          Diego Griffoi added a comment -

          Did you try with "ALWAYS_ARCHIVE_TEST_REPORT" as a value for archiveTestResultsMode?

           

          ONLY_ARCHIVE_FAILED_TESTS_REPORT -> Archive HPE test report for failed tests
          ALWAYS_ARCHIVE_TEST_REPORT -> Always archive HPE test reports
          PUBLISH_HTML_REPORT -> Always archive and publish HPE test reports (LR only)
          DONT_ARCHIVE_TEST_REPORT -> Do not archive HPE test reports

           

          Diego Griffoi added a comment - Did you try with "ALWAYS_ARCHIVE_TEST_REPORT" as a value for archiveTestResultsMode?   ONLY_ARCHIVE_FAILED_TESTS_REPORT -> Archive HPE test report for failed tests ALWAYS_ARCHIVE_TEST_REPORT -> Always archive HPE test reports PUBLISH_HTML_REPORT -> Always archive and publish HPE test reports (LR only) DONT_ARCHIVE_TEST_REPORT -> Do not archive HPE test reports  

          Anton Semenov added a comment -

          dgriffoi

          I  tried it

          And I received same error I already wrote.

          Anton Semenov added a comment - dgriffoi I  tried it And I received same error I already wrote.

          Anton Semenov added a comment -

          martinescuandrei, Hi
          Is it resolved?
          What  should I do to fix my problem?

          Anton Semenov added a comment - martinescuandrei , Hi Is it resolved? What  should I do to fix my problem?

            martinescuandrei Andrei Martinesc
            eldojoseph1234 Eldo Joseph
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: