버전 SQL 모델 유닛 테스트
버전 SQL 모델 유닛 테스트
모델에 여러 버전이 있으면 기본 유닛 테스트는 모델의 모든 버전에서 실행돼요. 특정 버전만 유닛 테스트하려면 모델 버전 구성에서 include 또는 exclude로 원하는 버전을 지정해요.
출처: 문서
본문
models/schema.yml
# my test_is_valid_email_address unit test will run on all versions of my_model
unit_tests:
- name: test_is_valid_email_address
model: my_model
...
# my test_is_valid_email_address unit test will run on ONLY version 2 of my_model
unit_tests:
- name: test_is_valid_email_address
model: my_model
versions:
include:
- 2
...
# my test_is_valid_email_address unit test will run on all versions EXCEPT 1 of my_model
unit_tests:
- name: test_is_valid_email_address
model: my_model
versions:
exclude:
- 1
...
더 알아보기 (Learn more)
- unit-tests 속성 — 유닛 테스트 정의
- versions 속성 — 버전 모델 정의