I’ve been using Postman to define API test scenarios for CoreSkills’ interview assignments, however, I noticed (through feedback and by myself) that devs naturally prefer command line to run those and Postman’s Newman test reports are far from good.
What could be a good alternative to writing API tests so that any candidate can understand those no matter what language they code in?
Hi fenske I have something that might be interesting to you.
I have an app that is similar to postman but is designed to be easier to understand while being more powerful.
Also ships as a downloadable app.
Tweet me at @mx2323
Well not sure what exactly you need, but there is a saas I've built for REST API testing. That's not intended for an interview, but might be used for it. It is language agnostic (only json file).
https://api-testing.net/
Love the simplicity it brings. Is it possible to use without an Internet connection?
Unfortunately no, because it is meant to be for testing a production service after deployment, to make sure you have no broken API. Also an account is based in the cloud.
What exactly do you think are the shortcomings of Newman?
My pet peeve when it comes to Newman is test reports it produces - they are not detailed and straightforward enough to give a hint on what's wrong.
Are you familiar with RAML or Swagger/Open API? If you've got a REST API, I'd start by googling those tools. Especially Swagger/Open API has a huge ecosystem of tools that will give you a lot of testing and documentation "for free" once you've written your API spec.
Would you recommend anything in particular?
I recommended googling those tools. Did you? If not, then please try this:
https://www.google.com/search?q=generate+tests+with+swagger
I don't know all the ins and out of your goals, your technical background or your current set-up, so all I can do is point you in a general direction. You'll know better than I whether or not it's a fit for you!
Here comes the difference. I'm not seeking to generate tests from an API spec. I already have test scenarios that I need to define using some concise lightweight open-source tool.
Surely I've done quite some research and identified a few options.
I was just curious about what the IH community thinks.
Which options are your favorite so far?
I've mainly considered JS testing frameworks, e.g. Jest and Ava (in combination with Supertest), given the assumption anyone can understand tests written in JS (can be completely mistaken here).
Interesting, I didn't know about Postman's Newman reports. Why can't you use Newman custom reporters[1]? Or is the problem that devs need to understand the test code itself?
1: https://learning.getpostman.com/docs/postman/collection-runs/command-line-integration-with-newman/#using-custom-reporters
I’d avoid building anything custom before exploring what is currently available.
And the problem is indeed that I want devs to be able to interpret the test spec.