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

Uploads archived junit results from Jenkinsfile

    Details

    • Similar Issues:

      Description

      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                    
          ])                
        }            
      }
      

       

       

        Attachments

          Issue Links

            Activity

            Hide
            gront Daniel Gront added a comment - - edited

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

            Show
            gront Daniel Gront added a comment - - edited Roy Lu , There is a PR for this enhancement, what is your opinion on this?
            Hide
            mohamed3laa 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```

            Show
            mohamed3laa 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```
            Hide
            gront Daniel Gront added a comment -

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

            Show
            gront Daniel Gront added a comment - It's not implemented yet and he created a pull request implementing it.
            Hide
            roy_lu 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". 

            Show
            roy_lu 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". 
            Hide
            gront Daniel Gront added a comment -

            Roy Lu, Is it available as a pipeline as well?

            Show
            gront Daniel Gront added a comment - Roy Lu , Is it available as a pipeline as well?
            Hide
            roy_lu 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.

            Show
            roy_lu 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.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: