API testing – API documentation

API testing

Postman, in addition to providing an API testing tool, also helps us to make API documentation extremely professional and easy. This API document can be shared by both the team and the client. Usually, the API is usually written by Dev on google sheets, but at a certain stage of development, the dev will be lazy to write the API docs or the API fixes a lot, they will not remember to update those fixes.

Postman’s Document API has an advantage when it updates what you manipulate on the framework into the API docs. In fact, every time we create a Collection, Postman has already created a Document for that Collection, so our work is relatively easy

Want to know how many Collections our account has. Click [Collection Links]

The entire Docs API of Collections will be displayed.

  • Click View Docs to view API Docs (this is a link of Private status, this link cannot be shared).
  • Click Publish to create a Public Share Link (This link can be viewed by anyone). You just need to copy the link and send it to others.

The question is, what are the components of an API Docs and how are those parts represented in Postman?

Components of an API Document:

  • Name of API Document
  • Description of API Docs
  • Name of each API
  • Description of the whole API: Purpose of the API, note the items to note
  • Params + description of params
  • Sample Request
  • Sample Response

Name of API Documentation : That’s the name of the Collection, simple editing

Description of API Documentation : The description of API Docs

How to Format this text using Markdown. You can check out the sample here http://markdownlivepreview.com/

Name of each API & Description of the whole API : The name of the API itself is the name we give each Request. How to Edit

This place also supports Markdown to format, in general, wherever you enter text, Postman also supports Markdown

Params + description of params : You fill in the Param or Body part like filling in the API before, but when writing API Docs, note: DO NOT fill in the Value part. See picture

This is the Example feature that Postman provides.

You Add an Example and then fill in the same information as a real API and you’re done.

Simple request: At this point, you must enter the Value for each Param, not blank.

Simple Response : You take 1 sample Reposne according to the Sample Request above and then Paste it in.

Then, you review your results in one of the 2 Public and Private links at the top of the article I said. It will have the following form:

The left part will be the List of APIs included in the project, click on each API to see details.

That’s it . Thank you for reading, for more articles about API testing , please go to link : https://testerpath.com/category/api-testing/

Leave a Reply

Your email address will not be published. Required fields are marked *

API testing

Test runner – API testing

Test runner – According to the previous post, you already know how to create simple tests for each API, but a project has too many APIs and too many different tasks, each task is a collection of several APIs how must be solved. Along with that is the management method that you think is applicable […]

API testing

How to test API

After reading “test API with Postman” series, you should be able to grasp the basic knowledge of the API and the functions Postman provides. But how to arrange tests and write Testcases for API still seems not very clear, so today I will write a post about how to test API properly. Reminder of knowledge […]

API testing

API Testing – Postman pre request script

In the previous article, I wrote about test Response, now I will continue to write about Postman pre request script. Here are the steps when sending a request. The Pre-request part will be the part Postman will process before sending the request, and the test script to handle the returned response. So what can Pre-request […]