Qualitia Automation Studio (QAS) supports integration with TeamCity, a Java-based build and continuous integration (CI) server. This integration helps streamline test execution and enhances software release quality with minimal effort.
With TeamCity integration, you can:
-
Trigger Qualitia test executions as part of your CI pipeline.
-
Access detailed execution reports that help analyze failures with in-depth logs.
-
Receive reports on demand or via email after execution completes.
To enable this integration, make sure your offline execution package is properly configured for use with TeamCity.
📚Prerequisites
Ensure the following software is installed before you begin:
-
TeamCity
-
JDK 11 or later
Installing TeamCity
To install TeamCity and the TeamCity Agent:
-
Download the latest version of TeamCity and JDK 11 or later.
-
Install JDK on your system.
-
Right-click the downloaded
TeamCity.exeand select Run as Administrator. -
Follow the on-screen installation instructions.
Installing the TeamCity Agent
-
After TeamCity installation completes, install the TeamCity Agent.
-
Open the Run window (
Win + R), typeservices.msc, and stop the TeamCity Agent service. -
Open Command Prompt as Administrator.
-
Navigate to the directory containing the
agent.batfile. -
Run the
agent.bat startto register and start the agent. -
Once the setup is complete, you will see a message confirming TeamCity installation along with a URL for further configuration (for example:
http://localhost:<port defined while installation>).
Configuring Project and Build in TeamCity
Once TeamCity.exe and JDK 11 or later are installed successfully, TeamCity is now ready for further configurations.
Creating a Project
-
Open the TeamCity URL and log in using your credentials.
-
Click Create Project and select Manually using the drop-down list.
-
Provide the following details:
-
Name
-
Project ID
-
(Optional) Description
-
-
Click Create.
Creating a Build Configuration
-
In the Build Configurations section, click Create build configuration and select Manually using the drop-down list.
-
Enter:
-
Name and the system update the Build ID accordingly
-
(Optional) Description
-
-
Click Create.
Build is now successfully created, and you can proceed to configure build execution steps
Configuring Artifact Paths
-
Open Project Settings by clicking the project name on the top of the screen.
-
Click Edit link next to your build configuration.
-
Under the General Settings tab, in the Artifact Paths field, enter:
%env.qualitiareportpath%/**/* => Report -
Click Save.
Adding Build Steps
-
Go to Build Steps > Click Add build step.
-
In the Runner Type dropdown, select Command Line.
-
Provide the following:
-
Step Name: (e.g., Download Execution Agent)
-
Run: Select
Custom Scriptfrom the drop-down. -
Custom Script: Enter
For HTTP:
curl -o executionAgent.jar -LJ http://<domain.name>/api/v1/download/executionAgentFor HTTPS:
curl -k -o executionAgent.jar -LJ https://<domain.name>/api/v1/download/executionAgent
-
-
Click Add build step again.
-
Set the following:
-
Runner Type: Select Command Line using the drop-down list.
-
Step Name: Enter step name as per your requirement (e.g., Run Qualitia Test Execution).
-
Run: Select Custom Script using the drop-down list.
-
Custom Script: Enter
java -jar executionAgent.jar serverUrl="<https://<domain.name>>" ProjectName="<Project Name>" Suite="<Suite Name>" executiontrigger="TeamCity" branch="main" CI_Tool="TeamCity"
-
-
First command hits Qualitia Bot API endpoints to generate a executionAgent.jar. This jar is bridge between CI tool (in this case TeamCity) and Qualitia Server for provided server URL.
-
In second command, utilize this bridge and provide arguments to access required artifacts.
Parameters Description
|
Parameter |
Description |
|---|---|
|
|
URL of the Qualitia Server |
|
|
Name of the project in Qualitia |
|
|
Name of the suite to execute |
|
|
Must be set to |
|
|
Branch name (e.g., |
|
|
Must be set to |
You can also include additional arguments such as browser, driverPath, and pollingInterval.
Running the Agent and Executing the Build
Once configuration is complete, you can proceed to execute your test cases.
-
Navigate to the TeamCity Agent installation directory.
-
Open Command Prompt and run the following command to start the agent:
agent.bat start -
Open the TeamCity project and select the desired build configuration.
-
Click Run from the top right corner of the screen.
-
To check logs, click In Progress Builds, and go to Build Logs section.
-
Once the build is complete, you can see Build finished at the end in the Build Log section.