Total Pageviews

2017/02/05

[Testing Tool] Postman

I am using Redmine Rest API to implement my web application. For example,  here has developer guide to teach us how to use rest API to find, create, update and delete project: https://www.redmine.org/projects/redmine/wiki/Rest_Projects

In order to make sure the JSON format for each action (i.e. CRUD) in request or response, we can make good use of Postman to assist us.

Installation


How-to
Firstly, we need to configure user name and password for logging into Redmine:


Secondly, we need to set content-type to application/json in Headers:


If I would like to test:

  • List projects: GET /projects.json
    • Select GET HTTP method, fill in URL and click Send button, then we can get the execution result
  • Show a project: GET /projects/[id].json
    • Select GET HTTP method, fill in URL and click Send button, then we can get the execution result
  • Create a project: POST /projects.json
    • Select POST HTTP method, fill in URL, prepare JSON string for creating a new project and click Send button, then we can get the execution result
  • Update a project: PUT /projects/[id].json
    • Select PUT HTTP method, fill in URL, prepare JSON string for updating  project and click Send button, then we can get the execution result
  • Delete a project: DELETE /projects/[id].json
    • Select DELETE HTTP method, fill in URL and click Send button, then we can get the execution result




Reference
[1] https://www.getpostman.com/
[2] https://dzone.com/articles/12-great-web-service-testing-tools?utm_content=bufferba092&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

No comments: