Skip to content
Development
Skill

/integration-testing-standards

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

From plugin
sdd
4359 skills7 agents3 commands

Claude Code

$ npx -y skills add LiorCohen/sdd --skill integration-testing-standards --agent claude-code

SKILL.md

integration-testing-standards.SKILL.md
name: integration-testing-standards
description: Integration testing patterns - database setup/teardown, API testing, contract testing, and Testkube execution.
user-invocable: false

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

| Aspect | Details | |--------|---------| | Location | `components/<testing-component>/tests/integration/` | | Framework | Vitest | | Executor | Testkube | | Runs In | Kubernetes cluster | | Written By | Tester 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:

  • [database-strategies.md](resources/database-strategies.md) — Transaction rollback, truncate, cleanup
  • [api-testing.md](resources/api-testing.md) — HTTP client, test patterns, examples
  • [authentication.md](resources/authentication.md) — Login helpers, protected endpoint tests
  • [testkube.md](resources/testkube.md) — Test definition YAML, suites, running tests

---

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.

Read more
@liorcohen
Ships withsdd

Structure for AI-assisted development AI coding assistants are powerful but chaotic. You prompt, you get code, but then what?

4359 skills7 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
43
Star history of LiorCohen/sdd on GitHub, a chart by star-history.com

Other skills on sdd.

agents-standards

agents-standards

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

@liorcohen@liorcohenInstall Skill
commands-standards

commands-standards

Standards for authoring SDD plugin commands — frontmatter, user interaction, skill/agent invocation, CLI integration, and output…

@liorcohen@liorcohenInstall Skill
commit

commit

Create a commit following repository guidelines with proper versioning and changelog updates.

@liorcohen@liorcohenInstall Skill
critic

critic

Two-step self-review at every task lifecycle phase. Step 1 (this skill) runs in-context to gather session signals — files read vs…

@liorcohen@liorcohenInstall Skill
d2

d2

D2 diagramming language reference for architecture diagrams, sequence diagrams, grid layouts, SQL tables, and class diagrams.…

@liorcohen@liorcohenInstall Skill
docs-standards

docs-standards

Writes and maintains user-facing documentation for the SDD plugin. Proactively detects when docs are out of sync with plugin…

@liorcohen@liorcohenInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about integration-testing-standards.

Which coding agents can use integration-testing-standards?
integration-testing-standards installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.