This is an action for the observability of test reports. It supports the JUnit XML format.
To parse the test reports,
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: pnpm test
- uses: quipper/test-report-observability-action@v0
with:
junit-xml-path: '**/junit.xml'
This action sends the metrics on push
, schedule
, or workflow_run
events by default.
You can set enable-metrics
input to change the condition.
All metrics have the following tags:
repository_owner
repository_name
workflow_name
This metric represents the number of succeeded test cases. It has the following tags:
testcase_name
testcase_file
testcase_owner
This actions sends only failed test cases by default.
You can set send-test-case-success
to send all test cases.
:warning: It may increase the custom metrics cost.
- uses: quipper/test-report-observability-action@v0
with:
junit-xml-path: '**/junit.xml'
send-test-case-success: true
This metric represents the number of failed test cases. It has the following tags:
testcase_name
testcase_file
testcase_owner
This metric represents the duration of test cases in seconds. It has the following tags:
testcase_name
testcase_conclusion
(success
orfailure
)testcase_file
testcase_owner
This action sends test cases slower than 1 second by default.
You can set filter-test-case-slower-than
to send all test cases.
:warning: It may increase the custom metrics cost.
- uses: quipper/test-report-observability-action@v0
with:
junit-xml-path: '**/junit.xml'
filter-test-case-slower-than: 0
This metric represents the duration of test files in seconds. It has the following tags:
testfile_name
testfile_owner
This action sends test files slower than 1 second by default.
You can set filter-test-file-slower-than
to send all test files.
:warning: It may increase the custom metrics cost.
- uses: quipper/test-report-observability-action@v0
with:
junit-xml-path: '**/junit.xml'
filter-test-file-slower-than: 0
If the repository has a CODEOWNERS file, this action adds the following tags to the metrics:
testcase_owner
testfile_owner
If the test report contains a relative path to the test case file,
you can set test-case-base-directory
to resolve the path.
- uses: quipper/test-report-observability-action@v0
with:
junit-xml-path: microservice/junit.xml
test-case-base-directory: microservice
Name | Default | Description |
---|---|---|
junit-xml-path |
(required) | Glob pattern to the JUnit XML file(s) |
metric-name-prefix |
testreport |
Prefix of the name of metrics |
filter-test-file-slower-than |
1 | Filter test files slower than the threshold (in seconds) |
filter-test-case-slower-than |
1 | Filter test cases slower than the threshold (in seconds) |
enable-metrics |
*1 | If false, do not send the metrics to Datadog |
send-test-case-success |
false | Send succeeded test cases |
send-test-case-failure |
true | Send failed test cases |
test-case-base-directory |
- | Base directory to resolve the test case file path |
datadog-api-key |
- | Datadog API key |
datadog-site |
- | Datadog site |
datadog-tags |
- | Datadog tags |
*1 See action.yaml for the default value.
None.