Organization Fields
- Zendesk Global test mechanisms enabled:
- Zendesk US Government test mechanisms enabled:
Manual Testing Protocol
When testing organization field changes, there are three areas we need to confirm:
- The organization field exists in the sandbox after the merge request is created
- The organization field’s custom options are correct (only if the field has custom options)
- A comparable JSON object from the API matches what is in the YAML file
The organization field exists in the sandbox
This is a test the Sandbox sync from the merge request created the organization field properly. To do this test, login to the Sandbox (as an admin), and navigate to People > Configuration > Organization fields in the admin panel. If the organization field you are creating/updating is listed there, the test passes.
The custom options are correct
This is a test the Sandbox sync from the merge request created the organization field’s custom options are correct. Note this test only needs to be done if the field has custom options.
To do this test, login to the Sandbox (as an admin), and navigate to People > Configuration > Organization fields in the admin panel and click on the organization field you are creating/updating. On the organization field’s page, review the custom options (both name and tag) to ensure they match what is expected. If they match completely, the test passes.
API object matches YAML object
This requires reviewing the API object from the Zendesk Sandbox and the YAML object from the file you are editing. Ensure the values of the following keys match:
titletypedescriptionkeytag(if one is present)positionregexp_for_validation(if one is present)custom_field_options(if they are present)
The test passes if the values between the two objects match exactly.
Test Suite Script
Presetup
Before running the script, ensure the following has been done:
GITLAB_TOKENis defined in your environmentSB_ZD_SECRETis defined in your environment (for Zendesk Global testing)SB_ZD_CLIENT_NAMEis defined in your environment (for Zendesk Global testing)SB_ADMIN_EMAILis defined in your environment (for Zendesk Global testing)SB_ADMIN_PASSWORDis defined in your environment (for Zendesk Global testing)US_SB_ZD_CLIENT_NAMEis defined in your environment (for Zendesk US Government testing)US_SB_ZD_SECRETis defined in your environment (for Zendesk US Government testing)US_SB_ADMIN_EMAILis defined in your environment (for Zendesk US Government testing)US_SB_ADMIN_PASSWORDis defined in your environment (for Zendesk US Government testing)
As this will involve a login as an admin/agent, you should also have the admin page for that user ready to generate recovery codes.
How it works
The script runs in “stages”:
- Pre setup
- This stage defines various core functions for the script to use (various Faraday connections primarily)
- Pre tests
- This stage checks to ensure Presetup has been done correctly. It will check for
- the environment variables it needs to run
- the current branch you are in is not
masterormain
- This stage checks to ensure Presetup has been done correctly. It will check for
- Definitions
- This stage defines various variables that are needed for the script to use
- GitLab Info
- This stage locates the merge request for your git branch, the corresponding parent issue, and the organization field changes that have been made within the merge request.
- Organization field tests
- This stage defines the tests to do and performs them
- For each organization field change detected previously, a child task item is created (linked to the parent item)
- As the tests are performed, it will add comments to the corresponding child task item with the details of the test and the results
- If browser testing was done, screenshots should be provided on the comments made
- Postrun instructions
- This stage adds a summary comment on the parent issue (linking to all child task items)
- It will also point to the location of all screenshots created in case the upload failed for any tests
- This stage adds a summary comment on the parent issue (linking to all child task items)
For a more detailed explanation, please see the corresponding recording (internal link).
26699b9a)
