Mock test automation with Wiremock + Xray + Jenkins possible?


  • QA Engineer

    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?


  • 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:



  • Hi @magpie ,
    @fbio has already answered; in sum, you can generate Junit XML report, using available reporters, and them submit it to Xray using a free Jenkins plugin available for that purpose. You could also generate a Xray JSON file but you would need to find/build a newman reporter for that,
    I wanted also to share this Postman tutorial which may be useful for you; the previous tutorial is for Xray on Jira cloud. If you're using Xray for Jira datacenter/server, the proper tutorial is this one instead.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2