Circle CI
To connect Circle CI to Testomat.io, lets start with configuring your Circle CI:
- Create an access token on Circle CI by following the instuctions by link.
-
Create a workflow in
config.yml
file in.circle
folder in the root folder in your repository. -
This workflow will be used solely by Testomat.io so it should start only on
workflow_dispatch
event. The event should be defined with the following input parameters:
parameters: testomatio: type: string default: ""
run: type: string default: ""
testomatio_url: type: string default: ""
grep: type: string default: ""
- The Job should include a step where the test runner is executed with
--grep
option andTESTOMATIO
environment variables passed in. For instance:
- run: name: Run tests command: npx codeceptjs run --grep "<< pipeline.parameters.grep >>" environment: TESTOMATIO: << pipeline.parameters.testomatio >> TESTOMATIO_RUN: << pipeline.parameters.run >> TESTOMATIO_URL: << pipeline.parameters.testomatio_url >>
After Circle CI is set up, its time to open your project in Testomat.io and configure the connection between these two systems.
- Go to ‘Settings’.
- Select ‘Continuous Integration’.
- Click ‘Connect to CI’.
- Select ‘Circle CI’ and enter following details on the ‘Connection’ tab:
Circle CI Trigger Url
- (see how it works here).Circle Token
- Auth token from Circle CI, created in Circle CI during Step 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).
- Click on ‘Save’ button to save the connection.
7a. When the connection is saved, open ‘Runs’ page and select Run Automated Tests in CI
option in extra menu.
8a. Select ‘Circle CI’ 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.
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 ‘Circle CI’ 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.
This will start a new job in Circle CI, 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.