-
Notifications
You must be signed in to change notification settings - Fork 0
3.1. Guidelines
First, it is a premise that we will build integration tests for an API. In this context, we need to put in our test what we do. So, we need to inform the API path and the Verb that we tested.
When these concepts are aligned, we can go to the next step.
We have many different tools that we can use to build an integration test, like Postman, Cypress, or Supertest. In each tool, the report, or test result, generates in a different way. So, pay attention! You need to inform the API Path and the Verb in the right place! In the XML Report, observe where is the description of the test. In Postman, will be inside the tag, and when you save your test, on the field name, just give the correct description, like below:
Usually, in other tool that use JS, the description of the test will be inside the tag. So, if you use the [describe...it] or [context...it], put the API Path and Verb inside the [it] method, like that:
Important:
- When you inform the test description, put the Verb and API Path, in this order, at the end of the description. The content before it is not important to the task and this does not impact it.
- It is very important to separate the API Path, Verb and other things by space.