InfoGrab Docs

테스트 격리

GitLab에서 테스트 격리를 위한 기술 참조.

이 페이지는 GitLab에서 테스트 격리를 구현하기 위한 기술 참조를 제공합니다. 격리 시기, 소유권 및 타임라인에 대한 프로세스 정보는 테스트 격리 프로세스 핸드북 페이지 를 참조하십시오. 테스트 격리란 무엇인가? # 테스트를 격리한다는 것은 코드베이스에서 보존하면서 향후 수정을 위해 CI에서 건너뛰도록 표시한다는 것을 의미합니다. 격리된 테스트는 기본적으로 로컬에서 실행되지만 다른 개발자가 차단되는 것을 방지하기 위해 CI 파이프라인에서 제외됩니다. RSpec 격리 # 기본 구문 # 테스트 실패 이슈의 URL과 함께 quarantine 메타데이터를 사용하십시오: # 단일 사양 격리 it 'succeeds' , quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/12345' do expect(response).to have_gitlab_http_status( :ok ) end # describe/context 블록 격리 describe '#flaky-method' , quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/12345' do [...] end 격리 메타데이터 유형 # 격리 유형을 지정하여 이유를 분류하십시오: it 'is flaky' , quarantine: { issue: 'https://gitlab.com/gitlab-org/quality/test-failure-issues/-/issues/12345' , type: :flaky } it 'is due to a bug' , quarantine: { issue: 'https://gitlab.com/gitlab-org/quality/test-failure-issues/-/issues/12345' , type: :bug } context 'when these tests rely on another MR' , quarantine: { type: :waiting_on , issue: 'https://gitlab.com/gitlab-org/gitlab/-/merge_requests/12345' } 사용 가능한 격리 유형: 유형 설명 :flaky 테스트가 간헐적으로 실패 :bug 애플리케이션 버그로 인해 테스트 실패 :stale 기능 변경으로 인해 테스트가 오래됨 :broken 테스트 코드 또는 프레임워크 변경으로 인해 테스트 실패 :waiting_on 테스트가 다른 이슈 또는 MR에 의존 :investigating 조사 중인 불안정한 테스트 :test_environment 환경 문제로 인해 테스트 실패 :dependency 외부 종속성으로 인해 테스트 실패 중첩된 컨텍스트 # 관련 태그가 있는 가장 바깥쪽 describe 또는 context 블록에 격리를 적용하십시오: # 좋은 예 RSpec .describe 'Plan' , :smoke , quarantine: { issue: 'https://gitlab.com/gitlab-org/quality/test-failure-issu