Skip to main content

Configure post-deployment tests

Learn how to use the CI/CD Manager API to configure Guidewire Testing (GT) Framework tests to run automatically after a successful InsuranceSuite deployment.

All sample requests in this guide include the following path parameters:

Parameter nameDescription
tenantIdTenant ID.
starSystemIdID of the star system.
postDeploymentTestIdID of the post-deployment test definition. You can get a post-deployment test ID by:
- Retrieving a list of all post-deployment tests.
- Creating a new post-deployment test to receive the ID in the response.

Retrieve all post-deployment tests​

To retrieve all post-deployment tests, send the following GET request:

curl -X 'GET' \
{baseUrl}/api/v2/tenants/{tenantId}/starsystems/{starSystemId}/post-deployment-tests \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'

For a successful request, you'll receive the 200 status code with a list of post-deployment tests in a given star system.

Retrieve a post-deployment test with a given ID​

To retrieve details of a single post-deployment test, send the following GET request with the given post-deployment test ID:

curl -X 'GET' \
{baseUrl}/api/v2/tenants/{tenantId}/starsystems/{starSystemId}/post-deployment-tests/{postDeploymentTestId} \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'

For a successful request, you'll receive the 200 status code with the details of the specified post-deployment test.

Create a post-deployment test​

To create a post-deployment test, send the following POST request:

curl -X 'POST' \
{baseUrl}/api/v2/tenants/{tenantId}/starsystems/{starSystemId}/post-deployment-tests \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{body}'

Where {body} contains the following parameters:

  • deploymentTestBuildParameters

    Configuration of the GT Framework tests including a branch from the GuidewireTestingFramework repository, GT UI Test parameters, and GT API Test parameters.

    Some of the parameters that you can set override the base CI/CD configuration at the application level. For more information about GT Framework parameters, see GT Framework UI Tests and GT Framework API Tests in the Guidewire Cloud Platform documentation.

  • name

    Name of the post-deployment test definition. It needs to be unique within the star system.

  • planetId

    Planet ID. A successful InsuranceSuite deployment to the planet with given ID triggers the tests. Passed value is automatically converted to lowercase.

  • testTypes

    Important:

    When using the GT Framework Tests template, don't use GT_TEST in new post-deployment tests. Use GTAPI_TEST or GTUI_TEST instead.

    Types of tests that will be executed. The available options include:

    • GTAPI_TEST

    • GTUI_TEST

    • GT_TEST

      This option is deprecated for new post-deployment tests. Use GTAPI_TEST or GTUI_TEST instead.

    Always specify testTypes. If not specified, GT_TEST will be used.

For example, to register GT Framework UI Tests execution after every InsuranceSuite deployment on the sandbox planet, send the following request body:

Request body
{
"name": "AutBuild_new_1",
"planetId": "sandbox",
"deploymentTestBuildParameters": {
"gtTestsParameters": null,
"branchName": "master",
"gtUiTestsParameters": {
"testcafeImage": "",
"enableGtMgt": true,
"xrayProjectId": "ABC",
"xrayFilterId": "12345",
"xrayFeatureDir": "behavior/features/api",
"xrayReportsDir": "reports/apibehaviortests",
"xrayLimit": "500",
"jiraApiUrl": "https://jira.tenant.cluster.guidewire.net/",
"jiraApiUser": "jira-system-user@guidewire.net",
"uiBehaviorTestsArgs": "--feature='behavior/features/**/ui/**/.feature' --glue='behavior/steps/**/.js'",
"uiFunctionalTestsArgs": "--tests=/tests/**/.js",
"testcafeArgs": "--browser=chrome --headless=true --browserInitTimeout=600000",
"gtArgs": ""
},
"gtApiTestsParameters": null
},
"testTypes": [
"GTUI_TEST"
]
}

The response contains a JSON object with the definition of the created post-deployment test.

Example response
{
"name": "AutBuild_new_1",
"planetId": "sandbox",
"deploymentTestBuildParameters": {
"gtTestsParameters": {},
"branchName": "master",
"gtUiTestsParameters": {
"testcafeImage": "",
"enableGtMgt": true,
"xrayProjectId": "ABC",
"xrayFilterId": "12345",
"xrayFeatureDir": "behavior/features/api",
"xrayReportsDir": "reports/apibehaviortests",
"xrayLimit": "500",
"jiraApiUrl": "https://jira.tenant.cluster.guidewire.net/",
"jiraApiUser": "jira-system-user@guidewire.net",
"uiBehaviorTestsArgs": "--feature='behavior/features/**/ui/**/.feature' --glue='behavior/steps/**/.js'",
"uiFunctionalTestsArgs": "--tests=/tests/**/.js",
"testcafeArgs": "--browser=chrome --headless=true --browserInitTimeout=600000",
"gtArgs": ""
},
"gtApiTestsParameters": {}
},
"id": "06e960b645624125a8afff3dd0a4c8c3",
"testTypes": [
"GTUI_TEST"
]
}

In the example, some of the parameters override the base CI/CD configuration set at the application level. For example:

"gtFrameworkUiTest": {
...
"uiBehaviorTestsArgs": "--feature='behavior/features/**/ui/**/.feature' --glue='behavior/steps/**/.js'",
"uiFunctionalTestsArgs": "--tests=/tests/**/.js",
"testcafeArgs": "--browser=chrome --headless=%env.headless% --browserInitTimeout=600000",
...
},

Update a post-deployment test with a given ID​

To update a post-deployment test, send the following PATCH request with the given post-deployment test ID:

curl -X 'PATCH' \
{baseUrl}/api/v2/tenants/{tenantId}/starsystems/{starSystemId}/post-deployment-tests/{postDeploymentTestId} \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{body}'

Where {body} contains the updated parameters for the post-deployment test. For example, to update the testcafeArgs configuration in gtUiTestsParameters, send the request with the following body:

[
{
"op": "replace",
"path": "/deploymentTestBuildParameters/gtUiTestsParameters/testcafeArgs",
"value": "--browser=chrome --headless=%env.headless% --quarantineMode=true --videoPathPattern=\${DATE}_\${TIME}/\${FIXTURE}/\${TEST}/test.mp4 --browserInitTimeout=600000 --disable-native-automation"
}
]

For a successful request, you'll receive the 200 status code.

Delete a post-deployment test with a given ID​

To delete a post-deployment test, send the following DELETE request with the given post-deployment test ID:

curl -X 'DELETE' \
{baseUrl}/api/v2/tenants/{tenantId}/starsystems/{starSystemId}/post-deployment-tests/{postDeploymentTestId} \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'

For a successful request, you'll receive the 204 status code.

See also​

For more information about GT Frameworks tests, see: