I am currently using Postman, Newman and Jenkins to automate the process of testing API end points. The API is being written in Node.js and Express.js. Currently the tests I write with Postman are being saved to a git repo, being fetched by Jenkins and run with Newman.

I now want to stream-line the process of creating the tests that I will run. Ideally some of the test could be automatically generated from the swagger.json/swagger.yaml file that can be generated from the Node.js files.

I am aware that I could drag/drop said swagger file into Postman to create a collection but I would like to get around the usage of the GUI and also to extract the expected responses here. Also, Newman allows one to RUN test from the command line but not to WRITE tests.

The ultimate goal is that as the API endpoints grow, creating tests for each is done quickly and from as few different environment as possible (Ideally only the textual interface).

Although the current tool in use is Postman I am open to exploring other equally capable tools.

I am new to most of these tools so if there a path where a lot of learning is required if I know the end goal is achievable; I am willing to follow that it. A point in the right direction would be greatly appreciated.

  • 1
    use a test framework like nUnit – Ewan Aug 10 '18 at 17:54
  • 1
    @Ewan while I agree with you, I think OP is asking how they can generate tests given a swagger definition. (Which I’m not certain is a good idea because those aren’t likely to be high value tests, but that’s beside the point.) – RubberDuck Aug 12 '18 at 15:57

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.