Skip to main content

Define default URLs for GT-Framework Tests

You can use the CI/CD Manager API to define default URLs of InsuranceSuite applications for the Guidewire Testing Framework pipelines. As a result, you don't have to manually provide the URLs each time you run the GT-Framework Tests build in TeamCity.

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

Parameter nameDescription
tenantIdTenant ID.
starSystemIdID of the logical star system that includes the application you want to modify.
applicationIdID of an application you modify.
For Guidewire Testing Framework, use GT_FRAMEWORK.

Note:

In the request URLs, substitute {baseUrl} with the correct URL for your region. For details, see Base URLs.

Get configuration

To check the currently defined URLs of InsuranceSuite applications, send the following request:

curl -X 'GET' \
'{baseUrl}/api/v2/tenants/{tenantId}/starsystems/{starSystemId}/cicd-configs/{applicationId}/insurer-config' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'

The default configuration contains empty values instead of URLs, for example:

Example response
{
...
"gtFrameworkTest": {
"bcUrl": "",
"bddTestsEnabled": true,
"ccUrl": "",
"cmUrl": "",
"nonBddTestsEnabled": true,
"pcUrl": ""
},
...
}

Define default URLs

To define default URLs of InsuranceSuite applications, send the following PATCH request:

curl -X 'PATCH' \
'{baseUrl}/api/v2/tenants/{tenantId}/starsystems/{starSystemId}/cicd-configs/{applicationId}/insurer-config' \
-H 'Accept: */*' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json-patch+json' \
-d '{body}'

Where {body} contains an updated configuration. Follow the JSON Patch format, for example:

Request body
[
{
"op": "replace",
"path": "/gtFrameworkTest",
"value": {
"bcUrl": "https://bc-testenv-prj.tenant.cluster.guidewire.net",
"bddTestsEnabled": true,
"ccUrl": "https://cc-testenv-prj.tenant.cluster.guidewire.net",
"cmUrl": "https://cm-testenv-prj.tenant.cluster.guidewire.net",
"nonBddTestsEnabled": true,
"pcUrl": "https://pc-testenv-prj.tenant.cluster.guidewire.net"
}
}
]

Because a JSON Patch document contains a list of operations, you can also reference each application separately:

Request body
[
{
"op": "replace",
"path": "/gtFrameworkTest/bcUrl",
"value": ""
},
{
"op": "replace",
"path": "/gtFrameworkTest/ccUrl",
"value": "https://cc-testenv-prj.tenant.cluster.guidewire.net"
},
{
"op": "replace",
"path": "/gtFrameworkTest/pcUrl",
"value": "https://pc-testenv-prj.tenant.cluster.guidewire.net"
},
{
"op": "replace",
"path": "/gtFrameworkTest/cmUrl",
"value": "https://cm-testenv-prj.tenant.cluster.guidewire.net"
}
]

You can also change the URL for a single application without updating the entire configuration.

For example, to define a default URL of BillingCenter, use the following:

Request body
[
{
"op": "replace",
"path": "/gtFrameworkTest/bcUrl",
"value": "https://bc-testenv-prj.tenant.cluster.guidewire.net"
}
]

Verify changes in TeamCity

By defining default URLs of InsuranceSuite applications, you update the values of the GT-Framework Tests build parameters.

To verify these changes in TeamCity:

  1. Click the ellipsis on the Run button for the GT-Framework Tests build.
  2. Go to the Parameters tab.
  3. Check the value of <Application> base URL parameter for each InsuranceSuite application.

Build parameters with default values


Troubleshooting

GT-UI steps do not include default URLs

If the GT-UI steps of the GT-Framework Tests build do not include the application URLs you have defined, make sure the config.json file contains correct configuration:

  1. Open the Bitbucket repository with your project.
  2. Go to GuidewireTestingFramework/gt-ui/config/config.json.
  3. Replace the parameter values with empty strings:
config.json
{
"PC_URL": "",
"CC_URL": "",
"BC_URL": "",
"CM_URL": "",
...
}