3

I am working as QA in a company. We create a client-server mobile application. Now I want to test our APIs via automation during my daily routine.

What is the best way to test a RESTful API? Any suggestions, any tools are welcome.

Update: unit tests, integration tests

6
  • What Kind of test you are talking about? unit-test, Integration test?
    – Jens
    Commented Jan 18, 2018 at 13:09
  • For Integration tests i suggest Soap-ui
    – Jens
    Commented Jan 18, 2018 at 13:09
  • Unit test and integration test are different animals and require different approaches. In which language is your app written? Commented Jan 18, 2018 at 13:37
  • It does not matter. I need to validate api responces
    – Valentin
    Commented Jan 18, 2018 at 14:32
  • 2
    Does this help at all - sqa.stackexchange.com/questions/14958/… ?
    – dvniel
    Commented Jan 18, 2018 at 14:41

2 Answers 2

1

Unit tests are the responsibility of dev-team, not QA one. They normally run on service build phase and require a lot of special knowledge (real objects mocking for example)

What QA usually does is use the public interface to ensure the service provides the functionality it declares.

The most known tool for testing REST is SOAP UI, however since REST is acting over HTTP you can use any tool that supports HTTP.

You should also consider performance testing of REST. SOAP UI supports some level of performance testing, however I would still suggest to use Jmeter since it allows to build load scenarios in more flexible way.

What is not convenient is that REST services do not usually expose the interface model they use (unlike Web-Services which act using SOAP) so that you should either push your devs to provide you full specification of service interface or suggest them to use REST service building framewrok like SWAGGER or some alternatives of SWAGGER.

This will simplify the process and let you build test clients automatically on any change in service interface.

1

It depends on what you want to test. Do you want to test the syntax of Http messages? The internal logic of the service? The connection to any db? All of the above? There are plenty of tools available to test REST API's. To suggest relevant tools / approaach we'd need to know which programming language do you want to use? Which language is the API written in? Will your test code be part of the project or a separate project?

Also possible duplicate of:

I am about to automate the Web API testing, how to initiate

Confusion of using rest api testing

RESTful JSON Web API Testing - what tools?

Not the answer you're looking for? Browse other questions tagged or ask your own question.