TransWikia.com

Mock test automation with Wiremock + Xray + Jenkins possible?

Software Quality Assurance & Testing Asked by Mornon on December 24, 2021

Task

Workflow, which links Wiremock + Postman + Jira +Xray + Jenkins in such a way that automatic test procedures can be carried out, which then return reports to Xray.

Details

Currently we use the following setting to run the test. But Jira + Xray + Jenkins are not yet integrated.

  • In Wiremock we create the respective mock-queries
  • We then use these queries in Postmann

Questions

  • Is it possible to automate this complete process?
  • Is this only possible via Junit?
  • Can this also be done via Python?

One Answer

TL;DR: Jenkins supports pipelines from code. Make your build, test and deploy pipeline in code and you are not dependent on a specific CD tool. If you can do it from the command line and with API's you can combine and chain any tool or test-step. Use Pipelines as Code!

Is it possible to automate this complete process?

Probably, but not out of the box with some clicks in a UI. Worst case you need to write some custom code or shell/bat-scripts to tie everything together in Jenkins. This makes Jenkins very flexible, if you can do it on the commandline you can do it in Jenkins.

Can this also be done via Python?

Same as above, if you can do it on the command line you can do it in Python with subprocess. Also Postman has a command line interface, maybe check out the Newman examples: https://learning.postman.com/docs/running-collections/using-newman-cli/command-line-integration-with-newman/

Is this only possible via Junit?

No, I don't see what JUnit has to do with it, the tool examples you give don't need the JUnit test-runner to run. Maybe using standard Jenkins steps you want to use JUnit test result output format which those tools support. XRay supports JUnit reports as does Postman, so it might make importing results easier. You could also use the Postman JSON output and rewrite it to a XRay JSON import, or parse the Postman JSON with code and call the XRay API.

Other reads:

Answered by Niels van Reijmersdal on December 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP