Class: Datadog::CI::Test
Overview
Represents a single part of a test run.
Instance Attribute Summary
Attributes inherited from Span
Instance Method Summary collapse
-
#finish ⇒ void
Finishes the current test.
-
#name ⇒ String
The name of the test.
-
#test_module_id ⇒ String
Span id of the running test module this test belongs to.
-
#test_session_id ⇒ String
Span id of the running test module this test belongs to.
-
#test_suite ⇒ Datadog::CI::TestSuite?
Running test suite that this test is part of (if any).
-
#test_suite_id ⇒ String
Span id of the running test suite this test belongs to.
- #test_suite_name ⇒ Object
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::Span
Instance Method Details
#finish ⇒ void
This method returns an undefined value.
Finishes the current test.
18 19 20 21 22 |
# File 'lib/datadog/ci/test.rb', line 18 def finish super CI.deactivate_test(self) end |
#name ⇒ String
Returns the name of the test.
12 13 14 |
# File 'lib/datadog/ci/test.rb', line 12 def name get_tag(Ext::Test::TAG_NAME) end |
#test_module_id ⇒ String
Span id of the running test module this test belongs to.
44 45 46 |
# File 'lib/datadog/ci/test.rb', line 44 def test_module_id get_tag(Ext::Test::TAG_TEST_MODULE_ID) end |
#test_session_id ⇒ String
Span id of the running test module this test belongs to.
50 51 52 |
# File 'lib/datadog/ci/test.rb', line 50 def test_session_id get_tag(Ext::Test::TAG_TEST_SESSION_ID) end |
#test_suite ⇒ Datadog::CI::TestSuite?
Running test suite that this test is part of (if any).
27 28 29 30 |
# File 'lib/datadog/ci/test.rb', line 27 def test_suite suite_name = test_suite_name CI.active_test_suite(suite_name) if suite_name end |
#test_suite_id ⇒ String
Span id of the running test suite this test belongs to.
34 35 36 |
# File 'lib/datadog/ci/test.rb', line 34 def test_suite_id get_tag(Ext::Test::TAG_TEST_SUITE_ID) end |