Setting Up a Test Repository
Please take the following under consideration when setting up a test repository:
-
The test repository is a folder residing in an online Git repository (GitHub, GitLab or BitBucket). The test repository may contain subfolders, which have tests. When setting up a job, the suite designer is able to add tests from any folder within the defined test repository.
-
Private (password-protected) and public test repositories are supported.
-
In the New Job Scheduling, the term "test" is equivalent to a Robot suite (i.e. a single Robot file)
-
Only Robot Framework tests are supported.
-
The New Job Scheduling does not currently support defining variables in external Python files.
-
Test parameters of type string scalar are supported and can be modified when adding the tests to the job.
-
Tests are associated to domains via a
.cs_domainsconfiguration file. For details, see Associating Tests to Different Domains. -
Test requirements must be defined in a
requirements.txtfile that resides in or above the folder containing the Robot tests.The following line must be included in the file, along with the rest of the tests' dependencies:
robotframework == 3.2.2To use Robot Framework 4.x, use the following line instead:
robotframework == 4.1.3Same as for shell and script virtual environments, virtual environments for jobs also use a
requirements.txtfile. When running the first test of a job, the test execution server creates the virtual environment and installs the dependencies listed in therequirements.txtfile that is closest to that test for all of the tests in the job. In other words, the test execution server first looks for therequirements.txtfile in the test's folder, then checks the parent folder and moves up the folder hierarchy until it finds arequirements.txtfile. If the file cannot be found, the job's execution will fail. In addition, if a test in the job needs a package or dependency that is missing from therequirements.txtfile, that test's execution will fail.It is therefore important to properly design your test repository and the
requirements.txtfiles to be used. For example, you could set up a test repository that has two main folders, each containing a differentrequirements.txtfile for the tests within that main folder and its subfolders. Furthermore, when you set up a job, make sure to only select tests from the same main test folder.For example: