Run tests on a Git branch
You can run a test suite or test suite collection against a Git branch other than the one your project's repository integration is connected to. You integrate the base test repository once in project settings, then choose any branch at run time on the Create Automated Test Run page, so you do not need to integrate every branch you want to test. Your selection applies to that run only, so it does not change project settings or interrupt anyone else working on the project.
When to use branch selection​
- Validate a feature branch before you merge it. Run your existing suites against the branch without changing the shared repository integration, so other project members keep running against the integrated branch.
- Reproduce a failure on a release or hotfix branch. Point one run at the branch that reproduces the problem while day-to-day runs continue unchanged.
- Compare the same suite across two branches. Create two runs that differ only in the selected branch, then compare the results.
- Follow a long-lived branch for the length of a release. Point a recurring schedule at a release-stabilization branch, then move it back when the release ships.
- Your project is connected to a Git repository through repository integration to enable the selection field. See GitHub integration, GitLab integration, or Bitbucket integration.
- The repository sync is complete, and your test suites or test suite collections appear in the project repository.
- The branch you want to run already exists in the connected repository.
To select a branch when you create a test run, expand Advanced Settings. Open the Git Branch dropdown. Katalon True Platform fetches the branch list from your Git provider each time you open the dropdown.
The dropdown defaults to the branch your repository integration is connected to.
Katalon True Platform checks out the branch you selected and runs your tests against that code. To confirm which branch a run used, open the debug log for that execution and look for the following entry:
Running tests on branch: <branch-name>
- The selected branch determines which version of the test code Katalon runs. The available test suites still come from the integrated branch, so suites that exist only on the selected branch cannot be added to the run.
- To make a new test suite selectable, add it to the integrated branch first.