Forum Discussion

Cata's avatar
Cata
Occasional Contributor
3 years ago
Solved

Control the report from ReadyApi through a Jenkins declarative pipeline script

Hi everyone, I'm running a suite of ReadyApi tests on a Jenkins pipeline (related plugin already installed) and at the end of that run ReadyApi puts out a pdf report that is available on Jenkins. ...
  • RTrainor's avatar
    3 years ago

    Hi Cata,

     

    This is an example script my colleague dermotcanniffe shared that should help -  

     

    something along these lines - 

     

    stage('Test') {
      steps {
        // One or more steps need to be included within the steps block.
        SoapUIPro environment: 'PreProd',
        pathToProjectFile: 'C:\\Users\.......\TestComplete 14 Projects\\REST-Project-210-readyapi-project.xml',
        pathToTestrunner: 'C:\\Program Files\\SmartBear\\ReadyAPI-3.20.0\\bin',
        projectPassword: <object of type hudson.util.Secret>,
        testCase: 'TCGetOrder',
        testCaseTags: '',
        testSuite: 'Awesome Shopping Store v1 TestSuite 1',
        testSuiteTags: ''
        }
      post {
        always {
          // One or more steps need to be included within each condition's block.
          allure includeProperties: false,
          jdk: '',
          results: [[path: 'allure-results']]
        }
      } 

     

    In the past I would have used a "post build action" in Jenkins to grab the outputted report file.

    So for example I would generate the report in xml and parse that  - 

    There is also an Allure plugin - https://plugins.jenkins.io/allure-jenkins-plugin/ that you can integrate with to make everything look really nice...

    I did this in the Jenkins UI though.

     

    Ronan