Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52753

Uploads archived junit results from Jenkinsfile

      It should be possible to updaload test execution test from a Jenkinsfile to HP ALM as the post action "Upload test result to ALM" does in free style jobs.

      An invocation example could be like this:

       

      // ... 
      post {
        always {
          junit testResults: '**/target/*-reports/TEST-*.xml', allowEmptyResults: true
          step ([$class: 'TestResultToALMUploader',
              almServerName: 'HP ALM Server', //almServerName
              credentialsId: 'ALM-CREDENTIALS',
              almDomain: 'ALMDomain', // almDomain
              almProject: 'AlmProject', //almProject,
              testingFramework: 'JUnit', //testingFramework
              testingTool:  '', //testingTool
              almTestFolder: 'TestHPALM', //almTestFolder
              almTestSetFolder:  'TestHPALM', //almTestSetFolder
              almTimeout:  '-1', //almTimeout
              testingResultFile:  "**/junitResult.xml", //testingResultFile
              jenkinsServerUrl:  ''  //jenkinsServerUrl                    
          ])                
        }            
      }
      

       

       

          [JENKINS-52753] Uploads archived junit results from Jenkinsfile

          Daniel Gront added a comment - - edited

          roy_lu, There is a PR for this enhancement, what is your opinion on this?

          Daniel Gront added a comment - - edited roy_lu , There is a PR for this enhancement, what is your opinion on this?

          Mohamed Alaa added a comment - - edited

          Is the above code working ? 

          it gives me the following error 

          ```java.lang.UnsupportedOperationException: no known implementation of interface jenkins.tasks.SimpleBuildStep is named uploadTestResultToAlmModel```

          Mohamed Alaa added a comment - - edited Is the above code working ?  it gives me the following error  ```java.lang.UnsupportedOperationException: no known implementation of interface jenkins.tasks.SimpleBuildStep is named uploadTestResultToAlmModel```

          Daniel Gront added a comment -

          It's not implemented yet and he created a pull request implementing it.

          Daniel Gront added a comment - It's not implemented yet and he created a pull request implementing it.

          Roy Lu added a comment -

          I don't understand. What you're asking is uploading Junit result which is already supported in "Upload test result to ALM". 

          Roy Lu added a comment - I don't understand. What you're asking is uploading Junit result which is already supported in "Upload test result to ALM". 

          Daniel Gront added a comment -

          roy_lu, Is it available as a pipeline as well?

          Daniel Gront added a comment - roy_lu , Is it available as a pipeline as well?

          Roy Lu added a comment -

          I created same ticket to track it https://issues.jenkins-ci.org/browse/JENKINS-53491

          So close this one.

          I'll implement this in the new ticket.

          Roy Lu added a comment - I created same ticket to track it  https://issues.jenkins-ci.org/browse/JENKINS-53491 So close this one. I'll implement this in the new ticket.

            roy_lu Roy Lu
            osdomin Oscar Dominguez
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: