본문으로 건너뛰기
cccskills
무료GitHub에 공개

integration-testing-standards

Integration testing patterns - database setup/teardown, API testing, contract testing, and Testkube execution.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Kubernetes
설치 방법 보기

포함된 파일(5)

  • SKILL.md4.1 KB
  • resources/api-testing.md4.4 KB
  • resources/authentication.md1.9 KB
  • resources/database-strategies.md3.2 KB
  • resources/testkube.md1.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Integration Testing Skill

Dynamic path: All paths below use components/<testing-component>/ as a placeholder. The actual directory depends on the testing component defined in sdd/sdd-settings.yaml. Delegate to the techpack-settings skill for directory path resolution — it maps component type (testing) + name to a filesystem path (e.g., type=testing, name=integration → components/testing-integration/).

Tests that verify multiple components working together with real infrastructure. Integration tests run in Kubernetes via Testkube for environment parity.


Overview

AspectDetails
Locationcomponents/<testing-component>/tests/integration/
FrameworkVitest
ExecutorTestkube
Runs InKubernetes cluster
Written ByTester agent

Test Structure

Directory Organization

components/<testing-component>/
├── tests/
│   └── integration/
│       ├── api/
│       │   ├── users.test.ts
│       │   ├── auth.test.ts
│       │   └── plans.test.ts
│       ├── db/
│       │   └── migrations.test.ts
│       └── helpers/
│           ├── client.ts
│           ├── database.ts
│           └── seed.ts
├── testsuites/
│   └── integration-suite.yaml
└── fixtures/
    └── seed-data.sql

Resource Files

For detailed guidance, read these on-demand:


Contract Testing

Request/Response Validation

import { describe, it, expect } from 'vitest';
import Ajv2020 from 'ajv/dist/2020.js';
import openApiSpec from '../../../../contract/openapi.json';

const ajv = new Ajv2020({ allErrors: true });

describe('API Contract Compliance', () => {
  describe('POST /api/users', () => {
    it('response matches OpenAPI schema', async () => {
      const response = await client.post('/api/users', validUserData);

      const schema = openApiSpec.paths['/api/users'].post.responses['201'].content['application/json'].schema;
      const validate = ajv.compile(schema);
      const valid = validate(response.data);

      expect(valid).toBe(true);
      if (!valid) {
        console.error('Schema validation errors:', validate.errors);
      }
    });
  });
});

Rules

  • Real infrastructure - Use actual database, no mocks for I/O
  • Environment parity - Tests run in Kubernetes like production
  • Cleanup after each test - Leave database in clean state
  • Independent tests - Tests must not depend on each other
  • Idempotent tests - Running twice produces same result
  • Reference spec and issue - Use @spec and @issue JSDoc tags
  • Given/When/Then structure - Clear test organization
  • Handle async properly - Await all database and HTTP operations
  • Reasonable timeouts - Set appropriate timeouts for network operations

Summary Checklist

Before committing integration tests, verify:

  • Tests use real database (not mocked)
  • Database cleanup happens after each test
  • @spec and @issue tags present in file header
  • Each acceptance criterion has corresponding tests
  • Tests follow Given/When/Then structure
  • HTTP client properly configured for test environment
  • Authentication helpers used for protected endpoints
  • Error scenarios tested (400, 401, 403, 404, 409, 500)
  • Testkube YAML definition created/updated
  • Tests run successfully via testkube run test

Input / Output

This skill defines no input parameters or structured output.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Standards for authoring SDD plugin agents — frontmatter, self-containment, skill references, and no-user-interaction rules.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Scaffolds Node.js/TypeScript backend components with CMDO architecture, driven by component settings.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

CMDO architecture standards for Node.js/TypeScript backends with strict layer separation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Intent-to-command mappings for fullstack-typescript tech pack features.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Create change specification and implementation plan with dynamic phase generation. Supports feature, bugfix, refactor, and epic types.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Orchestrates the full change lifecycle — routes actions to phase-specific sub-files.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

LiorCohen의 스킬 모두 보기

이 스킬의 문제 신고