Executing a CTM Bookmark from RESTful API Calls
After you have created bookmarks in Worksoft Bookmark, you can execute a bookmark through the RESTful API calls from CTM Swagger UI®.
For information about CTM Swagger UI, go to https://<servername>/continuoustestingmanager/swagger.
Worksoft Authentication API Swagger Site
Before you execute a suite from CTM Swagger UI, you need to open the Worksoft Authentication API Swagger site to get the following information for suite execution:
- Tenant ID string
- Group ID string
- User ID string
To get Worksoft Authentication information:
-
Open the Worksoft Authentication API Swagger site:
https://<servername>/authentication/swagger
-
Generate a token by clicking Authorize.
For more information, see Generating a Token for CTM RESTful API Calls.
-
After you have your token, go to the Tenant section and execute the GET method to acquire the tenant ID.
The tenant ID displays in the first line in the Response body.
-
Copy the ID for CTM suite execution.
-
Go to the Group section and execute the GET method to receive a list of groups.
The group IDs display in the Response body.
-
Copy the group ID that you want to add to your CTM suite.
-
Go to the User section and execute the GET method to receive a list of users.
The user IDs display in the Response body.
-
Copy the user IDs that you want to add to your CTM suite.
You are now ready to execute your CTM suite.
Executing a Suite from a Bookmark in CTM Swagger UI
You will use the IDs that you collected from the Worksoft Authentication API Swagger site to execute your suite.
To execute a suite from a bookmark in CTM Swagger UI, you will need to do the following:
- Get a list of databases
- Get the projects
- Get the bookmark
- Create suite
- Add groups
- Add users
- Execute suite
When you execute each method, the information that you need for the next step appears in the Response body section. The Response body section has the following codes:
- 200 = Success
- 400 = Bad Request
- 401 = Unauthorized
- 500 = Internal Server Error
To execute a CTM suite from a bookmark with RESTful API Calls:
-
Open the Worksoft CTM API Swagger site:
https://<servername>/continuoustestingmanager/swagger
-
Generate a token by clicking Authorize.
For more information, see Generating a Token for CTM RESTful API Calls.
-
After you have your token, go to the CertifyProject section and execute the GET method to get a list of databases from the Worksoft Portal. Use the tenant ID generated from the Worksoft Authentication API Swagger site.
-
In the CertifyProject section, execute the third GET method to get a list of projects.
-
In the Bookmark section, execute the first GET method to get a list of bookmarks.
-
In the Suite section, execute the POST method to create a suite.
In the Suite Group to add section, enter the bookmark ID in the SuiteSourceTypeId field.
-
In the SuiteGroup section, execute the POST method to add a group to the suite.
In the Suite Group to add section, enter the group ID that you saved from the Worksoft Authentication API Swagger site.
-
In the SuiteUser section, execute the POST method to add users to the suite.
In the Suite User to add section, enter the user ID that you saved from the Worksoft Authentication API Swagger site.
-
In the SuiteExecution section, execute the POST method to execute the suite.