You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backport ae7bab3 from #6368 to 1.17.
CI Visibility: Pytest module should always be reported, although it can
be empty if, for example, tests files are located at the root of the
project.
Taking into account that the Pytest Package may not exist, we need to
use Pytest Module to report the test module span (as with the test
suite).
Also, the test suite path is reported as relative to the test module.
Example of data reported with Flask tests (where there is no Pytest
Package):
Before:
```
{
"command": "pytest --ddtrace tests",
"fingerprint": "c3acffec7c31fbcd",
"framework": "pytest",
"framework_version": "6.2.4",
"full_name": "tests/test_testing.py.test_cli_custom_obj",
"has_parameters": false,
"name": "test_cli_custom_obj",
"service": "flask",
"status": "pass",
"suite": "tests/test_testing.py",
"type": "test"
}
```
After:
```
{
"bundle": "tests",
"command": "pytest --ddtrace tests",
"fingerprint": "406b79a08cd4b768",
"framework": "pytest",
"framework_version": "6.2.4",
"full_name": "tests.test_testing.py.test_cli_custom_obj",
"has_parameters": false,
"module": "tests",
"module_path": "tests",
"name": "test_cli_custom_obj",
"service": "flask",
"status": "pass",
"suite": "test_testing.py",
"type": "test"
}
```
## Checklist
- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed. If no release note is required, add label
`changelog/no-changelog`.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
## Reviewer Checklist
- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer has explicitly acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment.
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Co-authored-by: Federico Mon <[email protected]>
**Breaking change** for CI Visibility: `test.suite` and `test.full_name` are changed, so any visualization or monitor that uses these fields is potentially affected
4
+
fixes:
5
+
- |
6
+
pytest: This fix resolves an issue where test modules could be non-existent, causing errors in the CI Visibility product.
0 commit comments