Check this video to understand more about the reporter look and feel. The custom HTML extra reporter includes different views, a summary with all the requests and iterations, a view on request level where you can see the request body and headers, response body and headers and the test results. Open the reporter output, in this case the html report:įig.6 – Jenkins job: Newman Run Dashboard Check the build run started in the Build History section then check the HTML Report in the left menu:įig.7 – Jenkins job: Build run executed and HTML Report generatedī. Jenkins output with custom Newman reportersĪ. In the build area of the job include this script to execute the Newman command: newman run "$ For simplicity, on our case the pipeline will contain just the testing step. Just start from your own pipeline logic and add on top of this the testing step. retrieve information from Jenkins for programmatic consumption.In order to automate the Jenkins pipeline and to use the pipeline as a code approach, we can use the Jenkins Remote API. # get install script and pass it to execute:Īutomate the Jenkins pipeline job: create and build The last two are npm modules, so the entire installation process could be something like this (depending on your docker image): # start dockerĭocker run -u 0 -it ppiper/jenkins-master /bin/sh Install Node.js, Newman and HTML Extra Reporter on the Jenkins docker image. You can organize your test cases in different collections or folders based on your requirements.ĭepending on how the test scenario is defined and how the result is evaluated, one Postman request could look like this:ĭownload a Jenkins docker image, either the official image or the Piper image. Create/synchronize also a Postman environment for each Cloud Integration tenant. Check my previous article on how you can do this. Use a specific microservice/app to call the SAP Cloud Integration OData APIs and build the Postman requests. Solution details Create test cases as Postman requests Results are stored as custom HTML reporter output Newman CLI gets the Postman collection details and run the requests.Call Jenkins API to create pipeline job and to build/run the job.Call Postman API to create the test case as Postman request including request body, headers, pre-request script, testing script.Call SAP Cloud Integration OData APIs to extract the input and output test data: body, headers and properties.Outbound Message is triggered from SAP Cloud Integration.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |