Testim Documentation

Welcome to the Testim documentation. You'll find comprehensive guides to help you get started quickly, example code snippets, and tips for being more productive. You will also find details about advanced features that allow you to customize Testim to fit your environment or special testing conditions. Don't worry, we'll support you if you get stuck. Let's jump right in!

Guides    Changelog

Version control (branches)

Manage your tests according to your team development process.

By managing your tests with branches, you can get test results at a much earlier stage of development. In other words, when you use branches, you'll be able to test new features as they are being developed, instead of waiting for the final release.
When creating a branch, you "freeze" the state of the tests. Modifying a test in one branch does not affect how the test behaves in other branches.

Using Branches

  • As a starting point, each project is composed of a single "master" branch.
  • It's a good idea to create a new branch for every branch your team develops (e.g. your git branch), and test each branch independently. Testim can be integrated with GitHub , allowing you to automatically create new branches as they are created in GitHub and automatically merge tests when you merge your code.
  • You can switch branches at any time and modify tests within a branch as you like. Modifications in one branch will not affect other branches.
  • At a certain point you may want to merge between branches (e.g. merging a feature branch into the Master branch). To perform the merge, follow the instructions in the Merging Branches section. When you merge your (product) code, you should also merge your testing code. After the merge, consider deleting the branch .

Popular use cases for using Branches

You'll probably want to use branches in the following use cases:

  • To sync with your development process - Creating branches according to your different development environments makes it easier to manage, track & modify your tests in parallel with the development releases.
  • To test a new feature in a "sterile" environment - If the feature may affect other tests, it's a good idea to test it independently. Once everything works fine, then merge it to another branch.
  • To test Different stages - If your deployment process goes through several stages (e.g. Canary, Dev, Stable)

How to add a new branch?

Branches are added to a project and will include all the tests that existed in the source branch (e.g. the Master branch). You can add a new branch from any screen (e.g. Test List screen, a specific test, etc.). Any change you make to the tests will be automatically associated with the current branch. Other branches will not be affected. However, the same test data, test configuration and labels apply to all branches. So changing them in one branch will affect all branches.
To add a new branch:

  1. Click the Create New Branch (fork icon) button in the menu.
  2. Name your branch.
  3. Once created, you'll be able to modify your tests in the new branch. This will not affect the tests of the Master branch.

Switching Branches

You can switch to another branch or to the master branch.
To switch branch:

  • Click on the Branches drop-down menu at the top to see the list of branches and select the desired branch. The date near each branch name indicates when it was last modified.
  • You can use the Search function to filter the list of branches.

📘

Note

In case a test does not exist in the target branch, you'll be directed to the tests list - There you'll be able to see all the relevant tests that are associated with the current branch.

Deleting a branch

After the branch has been merged it is recommended to delete the branch.
To delete a branch:

  1. Click on the Branches drop-down menu at the top to see the list of branches and hover your mouse on the desired branch.
  2. Click the Delete icon.
  1. Click OK to confirm the deletion.

Running a test suite on a specific branch through the CLI

To run on a specific branch, use this parameter in your CLI

--branch <branch-name>

Branches integration with your CI

In order to run the appropriate test suite for the current development branch, you can either specify the branch name for that build (--branch) or if you are using one of the following: Jenkins, CircleCI or TravisCI, the Testim CLI will automatically run tests for the same branch if the following parameter is used.

--branch auto-detect

Notes:

  • The following attributes are shared between branches, changing them will affect tests across branches: test name, test description, test base URL, test labels , test data and test config.

Updated 3 months ago

Version control (branches)


Manage your tests according to your team development process.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.