TestBrain’s machine learning determines which of the automated tests in project are useful for the specific code changes in the code commits and triggers the CI to run the selected subset of tests. Most users will want to run a small subset of tests as soon as each commit is applied to get immediate test results back to the development team. However, it is possible to run TestBrain periodically instead, combining multiple commits into a single test run.
To allow TestBrain to specify the set of tests to run, you will need to add a bash script as an executable step in your CI pipeline. The CI script specifies which tests to run, the criteria for whether to fail the build or not, the syntax for running the tests, and path information to locate the tests and test results.
The CI Script Generator in the TestBrain GUI can generate the CI script for you to copy into your CI. The script generator covers all common conditions. A few advanced options can only be added to the script manually. For full CI script syntax and options, refer to here.
To run multiple test suites (i.e. separate suites for integration tests, API tests, UI tests, etc.) create a separate script for each test suite and add each script as a separate step in your CI pipeline.