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 do not 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 name | Description |
---|---|
tenantId | Tenant ID. |
starSystemId | ID of the GCC project (star system) that includes the application you want to modify. |
applicationId | ID of an application you modify. For Guidewire Testing Framework, use GT_FRAMEWORK . |
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:
{
...
"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:
[
{
"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:
[
{
"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:
[
{
"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:
- Click the ellipsis on the
Run
button for the GT-Framework Tests build. - Go to the Parameters tab.
- Check the value of
<Application> base URL
parameter for each InsuranceSuite application.
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:
- Open the Bitbucket repository with your project.
- Go to
GuidewireTestingFramework/gt-ui/config/config.json
. - Replace the parameter values with empty strings:
{
"PC_URL": "",
"CC_URL": "",
"BC_URL": "",
"CM_URL": "",
...
}
Was this page helpful?