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:

  1. Tenant ID string
  2. Group ID string
  3. User ID string

To get Worksoft Authentication information:

  1. Open the Worksoft Authentication API Swagger site:

    https://<servername>/authentication/swagger

  2. Generate a token by clicking Authorize.

    For more information, see Generating a Token for CTM RESTful API Calls.

  3. 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.

  4. Copy the ID for CTM suite execution.

  5. Go to the Group section and execute the GET method to receive a list of groups.

    The group IDs display in the Response body.

  6. Copy the group ID that you want to add to your CTM suite.

  7. Go to the User section and execute the GET method to receive a list of users.

    The user IDs display in the Response body.

  8. 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:

  1. Get a list of databases
  2. Get the projects
  3. Get the bookmark
  4. Create suite
  5. Add groups
  6. Add users
  7. 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:

  1. 200 = Success
  2. 400 = Bad Request
  3. 401 = Unauthorized
  4. 500 = Internal Server Error

To execute a CTM suite from a bookmark with RESTful API Calls:

  1. Open the Worksoft CTM API Swagger site:

    https://<servername>/continuoustestingmanager/swagger

  2. Generate a token by clicking Authorize.

    For more information, see Generating a Token for CTM RESTful API Calls.

  3. 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.

  1. In the CertifyProject section, execute the third GET method to get a list of projects.

  2. In the Bookmark section, execute the first GET method to get a list of bookmarks.

  1. 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.

  2. 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.

  3. 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.

  4. In the SuiteExecution section, execute the POST method to execute the suite.

 

Related Topics Link IconRelated Topics