In the past, WebService services were developed based on the HTTP protocol, and a test program was written to test them. Recently, restful was researched, and the previous WebService services were reconstructed, summing up a lot of experience, today we will introduce several rest client testing tools.
Introduction to rest
The so-called rest is the representational state transfer. The Chinese translation of this word is not uniform and obscure. It is called "concrete State transmission" or "object state transition.
Restful Web Services provide resource links through a concise and clear URI. The client sends an HTTP request to the URI to obtain these resources, the process of obtaining and processing resources changes the status of client applications (unlike those called in remote processes ).
The following HTTP methods are commonly used to perform CRUD (create, read, update, and delete) operations on resources: Post, get, put, and delete.
Browser-based rest client Tool
There are many plug-ins in chrome or Firefox browsers. I usually use Chrome browsers. You can find the plug-ins you want in chrome WebStore. Here we will talk about advance rest client, postman-rest client, Dev HTTP client, simple rest client, and restclient plug-in under Firefox.
Advanced rest Client
Web page Developer support to create and test custom HTTP requests. It is a very powerful client-side testing tool that has won praise from programmers. More than 50 K developers use this application every week. So many people will not be wrong!
Supported Functions
- Make a HTTP Request (via XMLHttpRequest Level 2)
- Debug socket (via web socket API ).
- JSON response Viewer
- XML response Viewer
- Set custom headers-even does not supported by XMLHTTPRequest object
- Help with filling HTTP headers (hint + Code Completion)
- Add headers list as raw data or via form
- Construct post or put body via raw input, form or send file (s) with request
- Set custom form Encoding
- Remember latest request (save current form state and restore on load)
- Save (CTRL + S) and open (CTRL + O) saved request forms
- History support
- Data Import/Export
Postman-rest Client
Postman can help you work more effectively on APIs. Postman is a scratch-your-own-itch project. It requires developers to effectively create an APIs in the project, which can be retained for API testing.
Supported Functions
- HTTP requests supports File Upload
- Format JSON and XML of API response
- Open the responses HTML file and display it in a new window.
- Engine that supports the status of hypermedia applications based on rest rules-hateos
- Image Preview
- Request history
- Basic oauth 1.0 Assistant
- AutoComplete for URL and header values
- You can use key/value to edit or add a parameter or header value in URL parameters.
- Use environment variables to easily transfer between settings. It can be used for testing, production, staging, or local setup.
- The value of the global variable is in the whole APIs
- Use the quick search function to preview variables and their value usage
- Keyboard Shortcuts maximize your productivity
Simple rest Client
Simple rest client plug-in provides a simple form for various HTTP operations, and you can see the returned information. Build Custom HTTP requests to test your network services directly.
Restclient in Firefox
Firefoxrestclient plug-in, developed by Chinese people, supports sending Basic and oauth login headers, and can highlight the returned XML data
Common Linux tool curl
Curl is a powerful File Transfer tool that supports various protocols. using it to test restful Web Services is simply a piece of cake.
Curl has many command parameters. The following four parameters are used for restful Web Services testing:
- -D/-Data: Post data content
- -X/-Request: Specify the Request Method (it is automatically set to post when-D is used)
- -H/-Header : Set header information
- -I/-head: only the returned HTTP header information is displayed.
Java GUI rest-Client
This is a test tool written in Java. It is mentioned on the project homepage that it has two versions: Command Line and GUI. To facilitate the operation, select the GUI version. Since it is a software, it is obviously more powerful than the browser plug-in just introduced. It supports shrinking and highlighting the response body in JSON and XML format. It can also build a restful server with one click, and also provides the unit test function.
Rest client browser-based testing tool