Advanced Options
Testomat.io Pipe
Testomat.io Pipe sends data to Testomat.io Application. Testomat.io provides free projects forever and unlimited test runs. Even it is a cloud application you can use it for free.
๐ To enable Testomat.io pipe set TESTOMATIO
environment variable with API key provided by Testomatio.
Here are some possible use cases where you can use additional configuration on reporter:
- Create Unmatched Tests
- Add Report to Run by ID
- Do Not Finalize Run
- Setting Report Title
- Reporting Parallel Execution to To Same Run
- Adding Report to RunGroup
- Adding Environments to Run
- Starting an Empty Run
- Manually Finishing Run
- Setting Build URL
- Publish Run
- Assign Label To Run
- Create Jira Issue for Run
- Filter Tests
Create Unmatched Tests
Testomat.io will not create tests from the report if they have not been previously imported. To create tests during the report TESTOMATIO_CREATE
option can be used:
Add Report to Run by ID
This feature is widely used when a run is executed on CI.
A run is created before the test is started and it is marked as scheduled
. Then
a report is assigned to that run using TESTOMATIO_RUN
environment variable and {RUN_ID}
of a run:
Do Not Finalize Run
If multiple reports are added to the same run, each of them should not finalize the run.
In this case use TESTOMATIO_PROCEED=1
environment variable, so the Run will be shown as Running
After all reports were attached and run can be execute the following command:
Setting Report Title
Give a title to your reports by passing it as environment variable to TESTOMATIO_TITLE
.
Reporting Parallel Execution to To Same Run
Provide a shared unique title to all runs that will be running in parallel, and add TESTOMATIO_SHARED_RUN
environment var. So all reports will be sent to this run.
We recommend using a commit hash as a title to create a new Run. In this case we ensure that run title is unique and will be the same for all parallel jobs running exactly for this commit.
By default you can report to the same run if a run was created no more than 20 minutes ago. If you want to increase this time you can use TESTOMATIO_SHARED_RUN_TIMEOUT
environment variable. TESTOMATIO_SHARED_RUN_TIMEOUT
accepts value in minutes, so to increase timeout to 2 hours (120 minutes) use the following command:
Adding Report to RunGroup
Create/Add run to group by providing TESTOMATIO_RUNGROUP_TITLE
:
Adding Environments to Run
Add environments to run by providing TESTOMATIO_ENV
as comma seperated values:
Starting an Empty Run
If you want to create a run and obtain its {RUN_ID}
from testomat.io you can use --launch
option:
This command will return {RUN_ID}
which you can pass to other jobs in a workflow.
When executed with
--launch
a command provided by-c
flag is ignored
Manually Finishing Run
If you want to finish a run started by --launch
use --finish
option. TESTOMATIO_RUN
environment variable is required:
Setting Build URL
When running on CI reporter tries to detect automatically the URL of the current build. This URL will be set to Run report. Reporter automatically detects build URL for following CI services:
- GitHub Actions
- Azure Devops
- Jenkins
- CircleCi
- Gitlab CI
If you are using a different CI or you want to override build url run tests with BUILD_URL
environment variable:
Publish Run
To make report publicly available pass TESTOMATIO_PUBLISH=1
variable:
Assign Label To Run
To assign a label to run, a label with scope runs
must exist.
Then a label can be passed via TESTOMATIO_LABEL
variable:
There is a way to pass a value to label via :
:
Or you can set multiple labels separating them with comma:
Create Jira Issue for Run
To automatically assign Run to Jira Issue pass the ID of that issue as TESTOMATIO_JIRA_ID
variable
For example, if your Jira issue id is TST-1
, command should be:
Filter Tests
Testomatio allows you to enhance your test execution with the option to filter and manage test runs based on various criteria. This can help you efficiently organize and execute your tests. Below, we explain how to use the --filter
option in conjunction with Testomatio for customized test runs.
The filtering functionality for test execution is currently available for the following frameworks: Playwright & CodeceptJS.
To use the --filter
option with Testomatio, follow the format:
Available Filter Types
Tag Name Filter
Filter tests by tag names. Use this filter to select tests associated with specific tags.
Command execution example
Plan ID Filter
Filter tests by Testomatio plan IDs. Use this filter to organize and execute tests based on plan IDs.
Command execution example
Label Filter
Filter tests using custom labels. Labels allow you to categorize tests for better management and execution.
Label Filter (by label name) Example 1:
Label Filter (by label id) Example 2:
Another Label Filter Example 3:
Command execution example
OR
Label Filter based on the Severity type
If you want to use a specific severity type, you should join the โseverityโ label id + severity type(e.g.: s1-id2:โ Blocker
).
Hereโs a list of available types that you can copy and add to the run command:
- โ ๏ธ Critical
- โ Blocker
- ๐ฅ Major
- ๐ Normal
- โ๏ธ Minor
- ๐ค Trivial
Label Filter Example based on the Severity type:
Command execution example
OR
JIRA Ticket Filter
Filter tests linked to JIRA tickets. Use this filter to coordinate testing efforts with your JIRA workflow.
Command execution example
๐ Example Usage
For instance, if you want to run tests with a specific label named โnew-label-test,โ you can use the following command:
OR using Playwright:
Remember to replace {API_KEY} with your actual Testomatio API key and adjust the
<actual run command>
according to your testing setup
Itโs important to note that the provided filter value must match exactly the corresponding tag name, plan ID, label, or JIRA ticket for the desired tests
Please note, that this functionality allows you to easily filter and execute tests based on specific criteria, enhancing your testing experience.
Exclude Tests from Report by Glob Pattern
To exclude tests from the report by glob pattern use TESTOMATIO_EXCLUDE_FILES_FROM_REPORT_GLOB_PATTERN
environment variable:
You can use multiple patterns separated by ;
:
(Any files in node_modules
will be ignored).