Apidog is a new tool that i discovered today.
My main purpose was get a tool that can help me generate request from swagger/api-json (the api schema) and then use the request in my api testing scenario.
Then i found Apidog.
The first thing i want to do is import all existed api from swagger to the project and this actually could be done pretty easier using apidog
Import API from swagger/api-json
- After you install Apidog app > open it
- Then on the left hand side, click at APIs, you should see something like this.
- Click on the purple plus button and choose import
- Click Submit then you'll see a list of your existed api
- Then Confirm
API List and Data Transfer Object Schema (DTOs)
After confirm i not only have the api list i also have the dto schema
I can also generate the typescript code from that schema dtos. AWESOMEEEEEEE!!!
Testing my imported API
Now let's do some simple test case and get the test report.
- Click Testing on the left hand side sidebar you should and click at the purple plus button and choose New Test Scenario
- What i'm gonna do is create a Health Check Test and you should see something like this
- Then choose add step click at import from APIs and choose the Health Check API
- Then i'm gonna choose Post Processors and select Response Body String Check on the right handside Template List
You Can see The script here
pm.test("Testing response", function () {
var jsonData = pm.response.json();
pm.expect(jsonData.message).to.eql("OK");
});
Test succeed case.
Test fail case.
The Final Report.
Readmore on Apidog