![]() Let’s create an API test and run it on Postman. The benefits? The availability to integrate with your CI. To run the script on Jenkins you need to add the parameters –reporters junit,json and the results should be created under a folder called “Newman” in your working directory, so: newman run -reporters junit,json /local/path_to_your_postman_collection.Are you using Postman to run your API tests? And are you familiar with Postman Collection runner? Today I’d like to share with you my experience of using Newman, a command line collection runner for Postman.The result will be something like this:. ![]() Open your terminal an type the command to run the API tests: newman run /local/path_to_your_postman_collection.json.Export your collection from Postman (Collection_v2) and download your environment (go to “Manage Environments” and click the download button) from Postman.Below is the code from gitlab-ci.yml smoketest-test: stage: smoketests-test dependencies: - deploy-test image: name: postman/newman:alpine entrypoint: '' script: - newman -version. I want to set these values through the CI. To run your tests from the command line you need to have Newman, open your terminal and run npm install -g newman There are two variables defined for my test. The results report will be like this one:. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |