- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Intelligent Test Runner is only supported in the following versions and testing frameworks:
datadog-ci >= 1.0
Ruby >= 2.7
rspec >= 3.0.0
minitest >= 5.0.0
cucumber >= 3.0.0
Prior to setting up Intelligent Test Runner, set up Test Visibility for Ruby. If you are reporting data through the Agent, use v6.40 and later or v7.40 and later.
You, or a user in your organization with the Intelligent Test Runner Activation (intelligent_test_runner_activation_write
) permission, must activate the Intelligent Test Runner on the Test Service Settings page.
After completing setup, run your tests as you normally do:
DD_ENV=ci DD_SERVICE=my-app bundle exec rake test
After completing setup, run your tests as you normally do:
DD_ENV=ci DD_SERVICE=my-app DD_CIVISIBILITY_AGENTLESS_ENABLED=true DD_API_KEY=$DD_API_KEY bundle exec rake test
You can override the Intelligent Test Runner’s behavior and prevent specific tests from being skipped. These tests are referred to as unskippable tests.
The Intelligent Test Runner uses code coverage data to determine whether or not tests should be skipped. In some cases, this data may not be sufficient to make this determination.
Examples include:
Designating tests as unskippable ensures that the Intelligent Test Runner runs them regardless of coverage data.
To ensure that RSpec tests within a specific block are not skipped, add the metadata key datadog_itr_unskippable
with the value true
to any describe
, context
, or it
block. This marks all tests in that block as unskippable.
# mark the whole file as unskippable
RSpec.describe MyClass, datadog_itr_unskippable: true do
describe "#my_method" do
context "when called without arguments" do
it "works" do
end
end
end
end
# mark one test as unskippable
RSpec.describe MyClass do
describe "#my_method" do
context "when called without arguments" do
it "works", datadog_itr_unskippable: true do
end
end
end
end
# mark specific block as unskippable
RSpec.describe MyClass do
describe "#my_method", datadog_itr_unskippable: true do
context "when called without arguments" do
it "works" do
end
end
end
end
To mark an entire feature file as unskippable in Cucumber, use the @datadog_itr_unskippable
tag. This prevents the Intelligent Test Runner from skipping any any of the scenarios defined in that feature file.
To make only specific scenarios unskippable, apply this tag directly to the desired scenario.
@datadog_itr_unskippable
Feature: Unskippable feature
Scenario: Say greetings
When the greeter says greetings
Then I should have heard "greetings"
Feature: An unskippable scenario
@datadog_itr_unskippable
Scenario: Unskippable scenario
When the ITR wants to skip this scenario
Then it will never be skipped
Scenario: Skippable scenario
When the ITR wants to skip this scenario
Then it will be skipped
To make an entire Minitest subclass unskippable, use the datadog_itr_unskippable
method. If you want to mark specific tests within the subclass as unskippable, provide the names of these test methods as arguments to the datadog_itr_unskippable
method call.
# mark the whole class unskippable
class MyTest < Minitest::Test
datadog_itr_unskippable
def test_my_method
end
end
# here only test1 and test2 are unskippab;e
class MyTest < Minitest::Test
datadog_itr_unskippable "test1", "test2"
def test1
end
def test2
end
def test3
end
end
The Intelligent Test Runner can be disabled locally by setting the DD_CIVISIBILITY_ITR_ENABLED
environment variable to false
or 0
.
DD_CIVISIBILITY_ITR_ENABLED
(Optional)(true)