Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIVIS-2844] Test suites support #77

Merged
merged 16 commits into from
Dec 5, 2023
Merged

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Dec 1, 2023

What does this PR do?
This PR adds support for test suites when test suite level visibility is enabled and a manual API to trace it.

To start a test suite:

Datadog::CI.start_test_suite(test_suite_name)

To get an active test suite and finish it:

test_suite = Datadog::CI.active_test_suite(test_suite_name)
test_suite.passed!
test_suite.finish

It supports running multiple test suites in parallel inside a process.

How to test the change?
Gist for testing:
https://gist.github.com/anmarchenko/b58ebb39fe2f9e391344d7d66212e3da

Produces the following session trace:
image

@codecov-commenter
Copy link

codecov-commenter commented Dec 1, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (c42591d) 99.34% compared to head (bf6bea8) 99.29%.

Files Patch % Lines
spec/datadog/ci/context/global_spec.rb 95.52% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
- Coverage   99.34%   99.29%   -0.05%     
==========================================
  Files         131      135       +4     
  Lines        4754     5140     +386     
  Branches      166      171       +5     
==========================================
+ Hits         4723     5104     +381     
- Misses         31       36       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anmarchenko anmarchenko changed the title Test suites support [CIVIS-2844] Test suites support Dec 4, 2023
@anmarchenko anmarchenko requested review from a team and tonyredondo December 4, 2023 15:51
@anmarchenko anmarchenko marked this pull request as ready for review December 4, 2023 15:52
@anmarchenko anmarchenko merged commit cc49b3c into main Dec 5, 2023
11 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/test_suites_support branch December 5, 2023 14:07
@github-actions github-actions bot added this to the 0.5.0 milestone Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants