How do we set up a Jenkins pipeline specifically for running API tests on backend applications.
Hey Danial,
It is recommended to execute a series of Newman tests within the pipeline.
I like to follow a general pattern something like this:
- Implement task so that it runs from the command line and does what I want
- Extend task to report its results in a format that Jenkins can display (JUnit test report, NUnit test report, TestNG report, or in the worst case, an HTML page with test results)
- Check the task definition into a git repository and add a Jenkinsfile that runs the command line program that I implemented in step 1
- Configure the Jenkinsfile to display the generated results (JUnit, NUnit, TestNG, etc.)
That pattern works for many tasks, including API testing.