To create a test for API's, like microservices, is very easy with DiveCloud.
There are different ways to create sessions from API workflow.
Create API's workflow via DiveCloud UI
In the Session Manager, the option "+" creates a manual workflow page as shown below.
It is possible to add GET, POST, PUT requests. Once the workflow is ready it can be saved as any other session. It is then possible to edit any single field, and add Headers or Request Data, as shown here.
It is possible to add variables, randomization and parameterization.
Import API workflow from Postman
When using Postman, DiveCloud can import all the Postman collections available.
From the Postman UI, select the Collection you want to import and then select the "Export" option from the pull down menu as shown in the image below.
It will ask you which version to use. Use V1, as shown in the image below.
This command will create a JSON file containing a list of all the collections of API workflows created via Postman. The file is save one your computer with a default name as this: <your_collection_name>.postman_collection.json
In DiveCloud, under the Session tab there is the import icon, as shown here below.
When selected it will show a pull down list of file types. Select the Postman type, then save. The collection will show up in the Session table as a separate session. The nam of the sessions will be the same names used in Postman as collection. Once collections are imported, they can be edited and modified as any other sessions.
Note: This method allows to record any HTTP and HTTPS requests.
Record API's workflow with DiveProxy
DiveProxy can be used to record all HTTP calls, including API requests and native apps.
- Connect to DiveProxy host 18.104.22.168 with port 8008 on your computer, phone, or other device.
- Go to the Session tab in DiveCloud or directly to the Diveproxy page.
- Create your API sequence with a tool of your choice
- Press "Record DiveProxy Session" to start
- Execute the sequence. Every request is now recorded by DiveProxy.
- You can then end your session by clicking the Stop Recording button.
- Your saved session will appear in your Session table with a name like DiveProxy<Timestamp>.
Note: DiveProxy can only collect HTTP requests.