- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Test Impact Analysis 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 Test Impact Analysis, set up Test Optimization for Ruby. If you are reporting data through the Agent, use v6.40 and later or v7.40 and later.
Intelligent Test Runner Activation (intelligent_test_runner_activation_write
) 권한이 있는 조직의 사용자는 Test Service Settings 페이지에서 Intelligent Test Runner를 활성화해야 합니다.
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 Test Impact Analysis’s behavior and prevent specific tests from being skipped. These tests are referred to as unskippable tests.
Test Impact Analysis 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 Test Impact Analysis 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 Test Impact Analysis from skipping 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
Test Impact Analysis can be disabled locally by setting the DD_CIVISIBILITY_ITR_ENABLED
environment variable to false
or 0
.
DD_CIVISIBILITY_ITR_ENABLED
(Optional)(true)