Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quipper/datadog-test-report-action
Send test reports to Datadog in GitHub Actions
https://github.com/quipper/datadog-test-report-action
datadog github-actions junit-xml-reports
Last synced: about 2 months ago
JSON representation
Send test reports to Datadog in GitHub Actions
- Host: GitHub
- URL: https://github.com/quipper/datadog-test-report-action
- Owner: quipper
- License: apache-2.0
- Created: 2024-01-21T09:11:41.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-11-03T06:20:48.000Z (2 months ago)
- Last Synced: 2024-11-03T07:19:02.836Z (2 months ago)
- Topics: datadog, github-actions, junit-xml-reports
- Language: TypeScript
- Homepage:
- Size: 12.6 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# datadog-test-report-action [![ts](https://github.com/quipper/datadog-test-report-action/actions/workflows/ts.yaml/badge.svg)](https://github.com/quipper/datadog-test-report-action/actions/workflows/ts.yaml)
This is an action to send test report to Datadog.
It supports the JUnit XML format.## Getting Started
To send the test report to Datadog,
```yaml
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: yarn test
- uses: quipper/datadog-test-report-action@v1
with:
junit-xml-path: '**/junit.xml'
```## Metrics
All metrics have the following tags:
- `repository_owner`
- `repository_name`
- `workflow_name`### `testreport.testsuite.count` (count)
This metric represents the number of test suites.
It has the following tags:- `testsuite_name`
### `testreport.testsuite.duration` (distribution)
This metric represents the duration of test suites in seconds.
It has the following tags:- `testsuite_name`
### `testreport.testcase.success_count` (count)
This metric represents the number of succeeded test cases.
It has the following tags:- `testcase_name`
- `testcase_classname`
- `testcase_file`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.```yaml
- uses: quipper/datadog-test-report-action@v1
with:
junit-xml-path: '**/junit.xml'
send-test-case-success: true
```### `testreport.testcase.failure_count` (count)
This metric represents the number of failed test cases.
It has the following tags:- `testcase_name`
- `testcase_classname`
- `testcase_file`### `testreport.testcase.duration` (distribution)
This metric represents the duration of test cases in seconds.
It has the following tags:- `testcase_name`
- `testcase_conclusion` (`success` or `failure`)
- `testcase_classname`
- `testcase_file`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.```yaml
- uses: quipper/datadog-test-report-action@v1
with:
junit-xml-path: '**/junit.xml'
filter-test-case-slower-than: 0
```## Specification
### Inputs
| 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-case-slower-than` | 1 | Filter test cases slower than the threshold (in seconds) |
| `enable-metrics` | true | 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 |
| `datadog-api-key` | - | Datadog API key |
| `datadog-site` | - | Datadog site |
| `datadog-tags` | - | Datadog tags |### Outputs
None.