3
14 Comments

Language agnostic API testing choice

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?

on December 22, 2019
  1. 1

    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

  2. 1

    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/

    1. 1

      Love the simplicity it brings. Is it possible to use without an Internet connection?

      1. 1

        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.

  3. 1

    What exactly do you think are the shortcomings of Newman?

    1. 1

      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.

  4. 1

    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.

    1. 1

      Would you recommend anything in particular?

      1. 1

        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!

        1. 1

          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.

          1. 1

            Which options are your favorite so far?

            1. 1

              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).

  5. 1

    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

    1. 1

      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.