Copado Integration
To automate testing from Copado, add the URL Callout step in Copado and use a single webhook call to the Testim/TTA for Salesforce REST API .
To integrate Copado:
-
In Testim/TTA for Salesforce, go to Settings > API.
-
Click Generate API Key.
-
Enter a name for the key and click Generate.
-
Copy the API key that is displayed and click Done. The only time this key is visible is when it is generated, so copy it as soon as you can.
-
Go to the Testim REST API in Swagger and select a type of remote execution API call, such as Test, Test Plan, Test Suite, or Test Label, and copy the JSON payload.
-
In the Copado Release Manager App, create a Deployment by adding a new step in the Steps section. To do so, follow these steps:
-
In the Type, select Perform callout and continue with deployment.
-
In the Method, select POST.
-
Unselect the Dynamic URL Parameters.
-
In the URL, enter the REST API call and append the Test, Test Plan, or Suite ID at the end of the URL. For example,
https://api.testim.io/tests/run/234
. -
Add the following headers:
- Authorization and enter the API key from step 4 in the format Bearer YOUR-API-KEY.
- Content-Type and enter application/json.
-
In the Body, paste the JSON payload from Swagger (step 5).
-
In the JSON payload, replace
"grid" : "string"
with the name of a grid from the Grids section of your profile in the top right of Testim/TTA for Salesforce. -
To test, save the step and click Deploy > Deploy All.
When the test is completed, click View Results in the Steps section. This deployment can also be done on Continuous Integration (CI).
-
Pausing Copado deployment until test is complete or based on test result
You can pause the Copado deployment until a test or test plan is completed, passed, or failed.
To pause Copado:
-
In Copado, navigate to Details > Type and select Perform callout and pause step and copy the Resume URL.
-
In Testim/TTA for Salesforce, create an Add API action step in the editor and make it a shared step.
-
In the Add API action step, enter the Resume URL (step 1) and disable Send via web page in the properties.
-
Go to Runs > Configuration list, create a new configuration, select After test handler, and select the shared step (step 2).
-
In the test or test plan settings, select the newly created configuration (step 4).
Updated 10 months ago