Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计提醒

testing-integration测试集成

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

1,488

周安装

62

GitHub Stars

160

下载量

496
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:testing-integration(测试集成)
来源仓库:https://github.com/yonatangross/orchestkit
仓库路径:skills/testing-integration
安装命令:
npx skills add https://github.com/yonatangross/orchestkit --skill testing-integration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yonatangross/orchestkit --skill testing-integration

简介

testing-integration 用于辅助测试设计、自动化测试、用例整理和回归验证。

  • 适合编写单元测试、端到端测试、测试计划或根据失败日志定位问题。
  • 使用时需确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器服务时应区分本地模拟与生产环境。
  • 建议在测试环境中验证后再部署到生产系统。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Integration & Contract Testing

Focused patterns for testing API boundaries, cross-service contracts, component integration, database layers, property-based verification, and schema validation.

Quick Reference

For complex emulate setups (full config generation, webhook HMAC, CI per-worker port isolation), delegate to the emulate-engineer subagent. Pairs with the emulate-seed skill.
AreaRule / ReferenceImpact
Stateful API testing (emulate)rules/emulate-stateful-testing.mdHIGH
API endpoint testsrules/integration-api.mdHIGH
React component integrationrules/integration-component.mdHIGH
Database layer testingrules/integration-database.mdHIGH
Zod schema validationrules/validation-zod-schema.mdHIGH
Pact contract testingrules/verification-contract.mdMEDIUM
Stateful testing (Hypothesis)rules/verification-stateful.mdMEDIUM
Evidence & property-basedrules/verification-techniques.mdMEDIUM

References

TopicFile
Consumer-side Pact testsreferences/consumer-tests.md
Pact Broker CI/CDreferences/pact-broker.md
Provider verification setupreferences/provider-verification.md
Hypothesis strategies guidereferences/strategies-guide.md

Checklists

ChecklistFile
Contract testing readinesschecklists/contract-testing-checklist.md
Property-based testingchecklists/property-testing-checklist.md

Scripts & Templates

ScriptFile
Create integration testscripts/create-integration-test.md
Test plan templatescripts/test-plan-template.md

Examples

ExampleFile
Full testing strategyexamples/orchestkit-test-strategy.md

Stateful API Testing (emulate — FIRST CHOICE)

For GitHub, Vercel, and Google API integration tests, emulate is the first choice. It provides full state machines that model real API behavior — not static mocks.

ToolBest For
emulateStateful API tests (GitHub/Vercel/Google) — FIRST CHOICE
PactCross-team contract verification
MSWFrontend HTTP mocking (simple request/response)
NockNode.js unit-level HTTP interception

See rules/emulate-stateful-testing.md for the full decision matrix, seed-start-test-assert pattern, and incorrect/correct examples.


Testcontainers (real dependencies in CI)

When contract tests and emulate aren't enough — e.g. testing against real Postgres, Redis, Kafka, or an S3-compatible store — Testcontainers spins up ephemeral Docker containers per test and tears them down afterward. path_patterns above already matches **/testcontainers/**; use these patterns there.

Target: testcontainers >= 11.0.0 (Node) — v11 (Q1 2026) added named-network auto-cleanup, reusable containers via .withReuse(), and first-class Podman support.

Node.js (testcontainers-node)

import { PostgreSqlContainer } from '@testcontainers/postgresql'
import { describe, beforeAll, afterAll, test, expect } from 'vitest'

describe('UserRepository integration', () => {
  let container: Awaited<ReturnType<PostgreSqlContainer['start']>>
  let repo: UserRepository

  beforeAll(async () => {
    container = await new PostgreSqlContainer('postgres:16-alpine')
      .withDatabase('test')
      .withUsername('test')
      .withPassword('test')
      .withReuse()  // v11+ — reuse across runs to speed CI
      .start()

    repo = new UserRepository(container.getConnectionUri())
    await repo.migrate()
  }, 30_000)

  afterAll(async () => {
    await container.stop()
  })

  test('persists and retrieves a user', async () => {
    const created = await repo.create({ email: 'a@b.c' })
    const found = await repo.findById(created.id)
    expect(found?.email).toBe('a@b.c')
  })
})

Python (testcontainers-python)

from testcontainers.postgres import PostgresContainer
import pytest

@pytest.fixture(scope="session")
def postgres():
    with PostgresContainer("postgres:16-alpine") as pg:
        yield pg.get_connection_url()

def test_user_repo(postgres):
    repo = UserRepository(postgres)
    repo.migrate()
    user = repo.create(email="a@b.c")
    assert repo.find_by_id(user.id).email == "a@b.c"

Decision matrix:

ScenarioPick
Third-party API (GitHub, Vercel, Google)emulate
Cross-team API contractPact
Real Postgres / Redis / Kafka integrationTestcontainers
Just mocking HTTP in a frontend testMSW

Quick Start: API Integration Test

TypeScript (Supertest)

import request from 'supertest';
import { app } from '../app';

describe('POST /api/users', () => {
  test('creates user and returns 201', async () => {
    const response = await request(app)
      .post('/api/users')
      .send({ email: 'test@example.com', name: 'Test' });

    expect(response.status).toBe(201);
    expect(response.body.id).toBeDefined();
    expect(response.body.email).toBe('test@example.com');
  });

  test('returns 400 for invalid email', async () => {
    const response = await request(app)
      .post('/api/users')
      .send({ email: 'invalid', name: 'Test' });

    expect(response.status).toBe(400);
    expect(response.body.error).toContain('email');
  });
});

Python (FastAPI + httpx)

import pytest
from httpx import AsyncClient
from app.main import app

@pytest.fixture
async def client():
    async with AsyncClient(app=app, base_url="http://test") as ac:
        yield ac

@pytest.mark.asyncio
async def test_create_user(client: AsyncClient):
    response = await client.post(
        "/api/users",
        json={"email": "test@example.com", "name": "Test"}
    )
    assert response.status_code == 201
    assert response.json()["email"] == "test@example.com"

Coverage Targets

AreaTarget
API endpoints70%+
Service layer80%+
Component interactions70%+
Contract testsAll consumer-used endpoints
Property testsAll encode/decode, idempotent functions

Key Principles

  1. Test at boundaries -- API inputs, database queries, service calls, external integrations
  2. Fresh state per test -- In-memory databases, transaction rollback, no shared mutable state
  3. Use matchers in contracts -- Like(), EachLike(), Term() instead of exact values
  4. Property-based for invariants -- Roundtrip, idempotence, commutativity properties
  5. Validate schemas at edges -- Zod .safeParse() at every API boundary
  6. Evidence-backed completion -- Exit code 0, coverage reports, timestamps

When to Use This Skill

  • Writing API endpoint tests (Supertest, httpx)
  • Setting up React component integration tests with providers
  • Creating database integration tests with isolation
  • Implementing Pact consumer/provider contract tests
  • Adding property-based tests with Hypothesis
  • Validating Zod schemas at API boundaries
  • Planning a testing strategy for a new feature or service

Related Skills

  • ork:testing-unit — Unit testing patterns, fixtures, mocking
  • ork:testing-e2e — End-to-end Playwright tests
  • ork:emulate-seed — Seed configuration authoring for emulate providers
  • ork:database-patterns — Database schema and migration patterns
  • ork:api-design — API design patterns for endpoint testing

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.14%
按下载量换算164

Claude

28.2%
按下载量换算140

Cursor

19.81%
按下载量换算98

Gemini CLI

9.81%
按下载量换算49

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills