justcatit/cat-skills

cat-smoke-tests

There should be data where data should be: the dumb test before any clever one, one row is enough, per table, per latest partition or period, per business slice, and generated for every table so the new one gets its test too.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/justcatit/cat-skills --skill cat-smoke-tests

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Smoke tests

Is there data? One row is enough, the test costs almost nothing, and when it fails nothing else is worth running. Every fact is on the documentation page it links; the same page as markdown is at the URL with index.md appended, which is the form to read when your fetch tool summarizes HTML.

The pattern

Three grains: the table, the latest partition or period, a business slice. The middle one catches the load that did not run; it runs first after every load and before the expensive comparisons. The tests, the grains, and the pairing with a freshness check when "not empty" is not enough: https://docs.justcat.it/how-to-guides/test-patterns/smoke-tests-with-set-is-not-empty/

The expectation and the one trap it has: https://docs.justcat.it/reference/tests/expectations/set-is-not-empty/

Every table, without writing every test

One template over the catalog (the tables of a schema, the partitions of a control table, the customers), tagged smoke, and the table created next week gets its test on the next open; load the skill for generating tests from metadata: https://docs.justcat.it/reference/tests/templates/

Run the smoke suite alone with the tag filter before anything else: https://docs.justcat.it/how-to-guides/organize-and-run-tests/run-your-tests/

The traps

  • SELECT COUNT(*) with set is not empty always passes: one row always comes back.

Select a row (TOP 1, LIMIT 1), not a count.

  • A table with one stale row passes; pair the smoke test with a freshness rule (`set is

empty on the newest timestamp being too old) or an exact set row count` where the count is known.

  • A smoke test per table that does not use a template is a test the new table never gets.

관련 작업