Class: Datadog::CI::TestSession
- Inherits:
-
ConcurrentSpan
- Object
- Span
- ConcurrentSpan
- Datadog::CI::TestSession
- Defined in:
- lib/datadog/ci/test_session.rb
Overview
Represents the whole test session process. Documentation on test sessions is here: docs.datadoghq.com/continuous_integration/explorer/?tab=testruns#sessions This object can be shared between multiple threads.
Instance Attribute Summary
Attributes inherited from Span
Instance Method Summary collapse
-
#finish ⇒ void
Finishes the current test session.
-
#inheritable_tags ⇒ Hash
Return the test session tags that could be inherited by sub-spans.
-
#name ⇒ String
Return the test session’s name which is equal to test command used.
Methods inherited from ConcurrentSpan
#get_tag, #initialize, #set_metric, #set_tag, #set_tags, #synchronize
Methods inherited from Span
#failed!, #failed?, #get_tag, #id, #initialize, #passed!, #passed?, #service, #set_default_tags, #set_environment_runtime_tags, #set_metric, #set_tag, #set_tags, #skipped!, #skipped?, #span_type, #to_s, #undefined?
Constructor Details
This class inherits a constructor from Datadog::CI::ConcurrentSpan
Instance Method Details
#finish ⇒ void
This method returns an undefined value.
Finishes the current test session.
17 18 19 20 21 |
# File 'lib/datadog/ci/test_session.rb', line 17 def finish super CI.deactivate_test_session end |
#inheritable_tags ⇒ Hash
Return the test session tags that could be inherited by sub-spans
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/datadog/ci/test_session.rb', line 31 def return @inheritable_tags if defined?(@inheritable_tags) # this method is not synchronized because it does not iterate over the tags collection, but rather # uses synchronized method to get each tag value res = {} Ext::Test::INHERITABLE_TAGS.each do |tag| res[tag] = get_tag(tag) end @inheritable_tags = res.freeze end |
#name ⇒ String
Return the test session’s name which is equal to test command used
25 26 27 |
# File 'lib/datadog/ci/test_session.rb', line 25 def name get_tag(Ext::Test::TAG_COMMAND) end |