Skip to content

TeamCity

Before configuring the TeamCity and Testomat.io integration, create a new project in your TeamCity workspace:

Testomat.io - TeamCity Create Project

On the same page Create Build Configuration.

Build configurations define how to retrieve and build sources of a project.

Create a Access Token for the user:

Testomat.io - TeamCity Access Token

Open ‘Parameters’ and setup new environment variables with empty default values:

  • run
  • testomatio
  • grep
  • testomatio_url

Testomat.io - TeamCity Set Project Parameters

Add a new Build Step: Command Line.

Script should include a step where the test runner is executed with —grep option and TESTOMATIO environment variables passed in.

For instance: - npx codeceptjs run-workers 2 --grep "${grep}"

Testomat.io - TeamCity Build Step

Save the build and switch to Testomat.io. To integrate TeamCity with your Testomat.io project follow the steps described below:

  1. Go to ‘Settings’.
  2. Select ‘Continuous Integration’.
  3. Click ‘Connect to CI’.

Testomatio - CI

  1. Select ‘TeamCity’ and enter following details on the ‘Connection’ tab:
  • Teamcity Host.
  • API token - API token from TeamCity Domain Authentication.
  • Build Name.

Testomatio - TeamCity

  1. Switch to ‘Input Variables’ tab and select checkboxes:
  • Send Run ID as run input (required for scheduled jobs).
  • Send Testomat.io API key as testomatio input.
  • Send Testomat.io Server URL as testomatio_url input (if you use on-premise setup).
  1. Click on ‘Save’ button to save the connection.

Testomatio - TeamCity

7a. When the connection is saved, open ‘Runs’ page and select Run Automated Tests in CI option in extra menu.

Testomatio - CI Run

8a. Select ‘TeamCity’ profile in a list, select a target ref or any other variables, if any were configured. Optionally, select a Test Plan or create a new one.

9a. Click on ‘Launch’ button and wait for the results.

Testomatio - TeamCity

OR

7b. On ‘Tests’ page select any automated suite or test case -> click ‘Extra menu’ button -> select ‘Run Tests’ option -> open ‘Run in CI’ tab.

8b. Select ‘TeamCity’ profile in a list, as well, select a target ref or any other variables, if any were configured.

9b. Click on ‘Launch’ button and wait for the results.

Testomatio - TeamCity

This will start a new job in TeamCity, please check that the job was successfully triggered and completed. After the job has finished, a run report will be available on Runs page of Testomat.io.

Testomatio - TeamCity