GitLab is a web-based source control system for storing and managing Git repositories. You can run your TestComplete project from this system. For this purpose, use GitLab Runner that works with GitLab CI/CD to run jobs in a pipeline.
The instructions below describe how to run TestComplete projects from GitLab:
Download GitLab Runner matching your Windows operating system version:
Rename the obtained file to gitlab-runner.exe.
Run the command line with administrator permissions and go to the folder where GitLab Runner was downloaded.
Run the following command line to register your runner:
As a GitLab instance URL, specify https://gitlab.com.
To obtain the registration token, open Settings > CI/CD > Runners in GitLab. Copy the token in the Specific runners section:
As an executor, specify shell.
Make sure that the GitLab runner has been registered successfully:
The specified runner has been added to your current GitLab project.
Install the runner as a service and start it. For these purposes, use the following command lines:
To simulate user actions during automated testing, TestComplete must have access to the user interface. In our case, we need to allow the service to interact with the desktop. For that, do one of the following:
If you use the Local System account to run the service, select the Allow service to interact with desktop checkbox.
Specify the user account that will be used to create an interactive user session.
For more information about installation and registration of GitLab runners, see the GitLab documentation.
Create a YAML file for your GitLab project. This file will contain a script that launches TestComplete projects from GitLab.
Choose your project in GitLab and click the New file button:
Add the script to the created file. The following example illustrates how you can launch a TestComplete project from GitLab and store test logs:
- cd "c:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin"
- echo "This job runs test set 1"
- .\SessionCreator.exe RunTest /UserName:domain\Tester /password:Password1 /UseActiveSession /ProjectPath:"C:\Users\Tester\Documents\TestComplete 15 Projects\TestProject1\TestProject1.pjs" /ExportLog:"$CI_PROJECT_DIR\logs1\test-results.html
CI_PROJECT_DIRis a predefined GitLab variable that stores the full path the repository is cloned to, and where the job runs from.