Looking for advise on API test frameworks/tools for developers on tight deadlines

Not applicable

Hi all,

I've been evaluating a few frameworks to test my API. Some of them were bloated, I'm looking at you Java: JMeter, SOAPUI, Grinder, REST-Assured, etc. Leaner ones based on script languages (Node.js and Ruby): Cucumber, Mocha, Supertest, Newman, etc. My ultimate goal is to find the tooling/framework that integrates with my flow and doesn't get on my way to get the API done fast, on budget and with higher quality.

After trying these frameworks, I've come to the realization that for my current project the following tools: Postman with Jetpacks for test assertions, Newman for CLI, Travis for CI, and Grunt.js strike the right balance. I'm aware that many things could be different but given the tight constraints aforementioned, this is a reasonable compromise between bloated and heavy tooling and nothing at all.

What is your ninja framework or swiss army knife to build the dreamed API?

I'd love to get your opinion on this matter.

0 2 1,263
2 REPLIES 2

adas
New Member

@Diego Zuluaga Very interesting topic, but then again it depends on what your goal is. If your primary goal is to test REST APIs using a light weight tool/framework then whatever you mentioned above would serve the purpose.

For slightly complex scenarios, we need the ability to write our own client libraries to perform specific tasks. For example, let's say I want to be able to update a config parameter on the server and then restart the server, or I want to be able to query a database and assert the result set with my API response, or simply being able to read few server side JMX metrics to write few end to end tests. These would require the ability to write custom code or use existing libraries to do the job. From that perspective I have found Java and TestNG to be the best solution so far. For simple REST API testing, you could use something like RestAssured or use some other http client implementation. For complex use-cases like the ones I mentioned above, you should be able to leverage various Java APIs and libraries to get the job done. You could write wrappers on top of these client libraries so that these can be made as utility methods in your test framework. We built one such framework in Apigee, I can share more details if you are interested.

I've found Postman to be quite useful for "crafting" my API on the fly, then extending to use Pre-request scripts and tests scripts to add in testing a use case scenario via a Postman "collection". With the use of environment variables, its easy to string together flows that rely on the results of previous calls, (e.g. OAuth token). These can then be run end-to-end in the "runner".

You can integrate your collections into your CI/CD process using "newman" command line interface.

With the use of global environment variables you can also build behavior driven testing, see this “describe-it” test framework.

Best part about Postman is its low barrier to entry and its popularity.