开发者

What are the best tools for testing web services with REST protocol and JSON data format? [closed]

开发者 https://www.devze.com 2023-03-08 15:31 出处:网络
Closed. This question is s开发者_JAVA技巧eeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently accepting ans
Closed. This question is s开发者_JAVA技巧eeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

I am new to testing of REST web services with JSON data format.

I tried SOUPUI, but unfortunately doesn't support JSON request.

I am now using the Chrome plugin for my tests, but I think it's not appropriate for test automation of these type of applications.

Does anybody know which tools are OK for this purpose?


We're using RestClient for testing our Rest/JSON WebServices. It's very handy and easy to use


A nifty framework/library for testing REST with json is "rest-assured"
http://code.google.com/p/rest-assured/

Inspired by BDD and Groovy ( but it's Java ) it makes it easy to test REST resources

given().
        param("key1", "value1").
        param("key2", "value2").
expect().
        body(containsString("OK")).
when().
        post("/somewhere");


And it's easy to work with JSON path

// Example with JsonPath
String json = get("/lotto").asString()
List<String> winnderIds = from(json).get("lotto.winners.winnerId");


Getting started is easy.
http://code.google.com/p/rest-assured/wiki/GettingStarted

Disclaimer
rest-assured is founded and managed by the Company I work for.


One such tool is HttpMaster.

It's quite flexible regarding REST API testing and has good JSON/XML support. For advanced test scenarios, you can define response data validations and establish chains of multiple requests. The only possible drawback is that it runs on Windows only.


There are few plugins which can be added for SOAP UI so that Json files can be accessed.

0

精彩评论

暂无评论...
验证码 换一张
取 消