[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758HSAV24G3410FPC1FHWDE":3,"skill-same:01M758HSAV24G3410FPC1FHWDE":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M758HSAV24G3410FPC1FHWDE","running-integration-tests",null,"Execute integration tests validating component interactions and system integration.\nUse when performing specialized testing.\nTrigger with phrases like \"run integration tests\", \"test integration\", or \"validate component interactions\".","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Frunning-integration-tests\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: running-integration-tests\ndescription: |\n  Execute integration tests validating component interactions and system integration.\n  Use when performing specialized testing.\n  Trigger with phrases like \"run integration tests\", \"test integration\", or \"validate component interactions\".\n\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(test:integration-*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\n---\n# Integration Test Runner\n\n## Overview\n\nExecute integration tests that validate interactions between multiple components, services, and external systems. Tests real database queries, API calls between services, message queue publishing\u002Fconsuming, and file system operations without mocking the integration boundary.\n\n## Prerequisites\n\n- Integration test framework installed (Jest + Supertest, pytest, JUnit 5, or Go testing)\n- External services running (database, cache, message queue) via Docker Compose or Testcontainers\n- Database migrations applied and seed data loaded\n- Test configuration with connection strings pointing to test instances (not production)\n- Sufficient timeout settings (integration tests are slower than unit tests)\n\n## Instructions\n\n1. Identify integration boundaries to test:\n   - API routes with database queries (controller-to-repository flow).\n   - Service-to-service HTTP communication.\n   - Message queue producers and consumers.\n   - File upload\u002Fdownload with storage services.\n   - Cache read\u002Fwrite operations (Redis, Memcached).\n2. Set up test infrastructure:\n   - Start required services using `docker-compose -f docker-compose.test.yml up -d`.\n   - Or use Testcontainers to programmatically start\u002Fstop containers per test suite.\n   - Run database migrations against the test database.\n   - Seed baseline data required by the test suite.\n3. Write integration tests following these patterns:\n   - **API integration**: Send HTTP requests via Supertest and assert responses including headers, status, and body.\n   - **Database integration**: Execute the service method and verify database state with direct queries.\n   - **Event integration**: Publish a message and verify the consumer processes it correctly.\n   - Use real implementations, not mocks, at the integration boundary.\n4. Manage test data isolation:\n   - Wrap each test in a database transaction and roll back after assertion.\n   - Or truncate tables in `beforeEach` and re-seed minimum required data.\n   - Use unique identifiers per test to avoid collisions in shared databases.\n5. Handle asynchronous operations:\n   - Poll for expected state changes with timeout (e.g., wait for queue consumer to process).\n   - Use event listeners or callbacks to signal completion.\n   - Set generous timeouts (10-30 seconds) for external service interactions.\n6. Run integration tests separately from unit tests:\n   - Tag with `@integration` or place in a separate directory (`tests\u002Fintegration\u002F`).\n   - Configure CI to run integration tests in a dedicated job with service containers.\n7. Generate test results in JUnit XML format for CI reporting.\n\n## Output\n\n- Integration test files in `tests\u002Fintegration\u002F` organized by feature\n- Docker Compose test configuration for service dependencies\n- Database seed and teardown scripts\n- JUnit XML test results for CI consumption\n- Integration test coverage report showing tested integration points\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| Connection refused to database | Database container not yet ready | Add `wait-for-it.sh` or health check polling before running tests; increase startup timeout |\n| Foreign key constraint violation | Test data inserted in wrong order or cleanup incomplete | Seed data in dependency order; use cascading deletes in teardown; wrap in transactions |\n| Flaky test due to race condition | Async consumer has not processed the message yet | Use polling with timeout instead of fixed sleep; add event completion callbacks |\n| Test passes locally, fails in CI | CI uses different service versions or network config | Pin Docker image versions; verify environment variables match; check CI service container logs |\n| Slow test suite (>5 minutes) | Too many integration tests or insufficient parallelization | Run independent test suites in parallel CI jobs; use Testcontainers reuse mode; limit seed data |\n\n## Examples\n\n**Supertest API integration test:**\n```typescript\nimport request from 'supertest';\nimport { app } from '..\u002Fsrc\u002Fapp';\nimport { db } from '..\u002Fsrc\u002Fdatabase';\n\ndescribe('POST \u002Fapi\u002Fusers', () => {\n  beforeEach(async () => { await db.query('DELETE FROM users'); });\n  afterAll(async () => { await db.end(); });\n\n  it('creates a user and persists to database', async () => {\n    const response = await request(app)\n      .post('\u002Fapi\u002Fusers')\n      .send({ name: 'Alice', email: 'alice@example.com' })\n      .expect(201);  # HTTP 201 Created\n\n    expect(response.body).toMatchObject({ name: 'Alice' });\n    const row = await db.query('SELECT * FROM users WHERE email = $1', ['alice@example.com']);\n    expect(row.rows).toHaveLength(1);\n  });\n});\n```\n\n**pytest with database transaction rollback:**\n```python\nimport pytest\nfrom myapp.services import UserService\n\n@pytest.fixture\ndef db_session(test_database):\n    session = test_database.begin_nested()\n    yield session\n    session.rollback()\n\ndef test_create_user_persists_to_db(db_session):\n    service = UserService(db_session)\n    user = service.create(name=\"Alice\", email=\"alice@test.com\")\n    assert user.id is not None\n    found = db_session.query(User).filter_by(email=\"alice@test.com\").one()\n    assert found.name == \"Alice\"\n```\n\n## Resources\n\n- Supertest: https:\u002F\u002Fgithub.com\u002Fladjs\u002Fsupertest\n- Testcontainers: https:\u002F\u002Ftestcontainers.com\u002F\n- pytest database fixtures: https:\u002F\u002Fdocs.pytest.org\u002Fen\u002Fstable\u002Fhow-to\u002Ffixtures.html\n- Docker Compose for testing: https:\u002F\u002Fdocs.docker.com\u002Fcompose\u002Fuse-cases\u002F#testing\n- Integration testing strategies: https:\u002F\u002Fmartinfowler.com\u002Fbliki\u002FIntegrationTest.html","# Integration Test Runner\n\n## Overview\n\nExecute integration tests that validate interactions between multiple components, services, and external systems. Tests real database queries, API calls between services, message queue publishing\u002Fconsuming, and file system operations without mocking the integration boundary.\n\n## Prerequisites\n\n- Integration test framework installed (Jest + Supertest, pytest, JUnit 5, or Go testing)\n- External services running (database, cache, message queue) via Docker Compose or Testcontainers\n- Database migrations applied and seed data loaded\n- Test configuration with connection strings pointing to test instances (not production)\n- Sufficient timeout settings (integration tests are slower than unit tests)\n\n## Instructions\n\n1. Identify integration boundaries to test:\n   - API routes with database queries (controller-to-repository flow).\n   - Service-to-service HTTP communication.\n   - Message queue producers and consumers.\n   - File upload\u002Fdownload with storage services.\n   - Cache read\u002Fwrite operations (Redis, Memcached).\n2. Set up test infrastructure:\n   - Start required services using `docker-compose -f docker-compose.test.yml up -d`.\n   - Or use Testcontainers to programmatically start\u002Fstop containers per test suite.\n   - Run database migrations against the test database.\n   - Seed baseline data required by the test suite.\n3. Write integration tests following these patterns:\n   - **API integration**: Send HTTP requests via Supertest and assert responses including headers, status, and body.\n   - **Database integration**: Execute the service method and verify database state with direct queries.\n   - **Event integration**: Publish a message and verify the consumer processes it correctly.\n   - Use real implementations, not mocks, at the integration boundary.\n4. Manage test data isolation:\n   - Wrap each test in a database transaction and roll back after assertion.\n   - Or truncate tables in `beforeEach` and re-seed minimum required data.\n   - Use unique identifiers per test to avoid collisions in shared databases.\n5. Handle asynchronous operations:\n   - Poll for expected state changes with timeout (e.g., wait for queue consumer to process).\n   - Use event listeners or callbacks to signal completion.\n   - Set generous timeouts (10-30 seconds) for external service interactions.\n6. Run integration tests separately from unit tests:\n   - Tag with `@integration` or place in a separate directory (`tests\u002Fintegration\u002F`).\n   - Configure CI to run integration tests in a dedicated job with service containers.\n7. Generate test results in JUnit XML format for CI reporting.\n\n## Output\n\n- Integration test files in `tests\u002Fintegration\u002F` organized by feature\n- Docker Compose test configuration for service dependencies\n- Database seed and teardown scripts\n- JUnit XML test results for CI consumption\n- Integration test coverage report showing tested integration points\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| Connection refused to database | Database container not yet ready | Add `wait-for-it.sh` or health check polling before running tests; increase startup timeout |\n| Foreign key constraint violation | Test data inserted in wrong order or cleanup incomplete | Seed data in dependency order; use cascading deletes in teardown; wrap in transactions |\n| Flaky test due to race condition | Async consumer has not processed the message yet | Use polling with timeout instead of fixed sleep; add event completion callbacks |\n| Test passes locally, fails in CI | CI uses different service versions or network config | Pin Docker image versions; verify environment variables match; check CI service container logs |\n| Slow test suite (>5 minutes) | Too many integration tests or insufficient parallelization | Run independent test suites in parallel CI jobs; use Testcontainers reuse mode; limit seed data |\n\n## Examples\n\n**Supertest API integration test:**\n```typescript\nimport request from 'supertest';\nimport { app } from '..\u002Fsrc\u002Fapp';\nimport { db } from '..\u002Fsrc\u002Fdatabase';\n\ndescribe('POST \u002Fapi\u002Fusers', () => {\n  beforeEach(async () => { await db.query('DELETE FROM users'); });\n  afterAll(async () => { await db.end(); });\n\n  it('creates a user and persists to database', async () => {\n    const response = await request(app)\n      .post('\u002Fapi\u002Fusers')\n      .send({ name: 'Alice', email: 'alice@example.com' })\n      .expect(201);  # HTTP 201 Created\n\n    expect(response.body).toMatchObject({ name: 'Alice' });\n    const row = await db.query('SELECT * FROM users WHERE email = $1', ['alice@example.com']);\n    expect(row.rows).toHaveLength(1);\n  });\n});\n```\n\n**pytest with database transaction rollback:**\n```python\nimport pytest\nfrom myapp.services import UserService\n\n@pytest.fixture\ndef db_session(test_database):\n    session = test_database.begin_nested()\n    yield session\n    session.rollback()\n\ndef test_create_user_persists_to_db(db_session):\n    service = UserService(db_session)\n    user = service.create(name=\"Alice\", email=\"alice@test.com\")\n    assert user.id is not None\n    found = db_session.query(User).filter_by(email=\"alice@test.com\").one()\n    assert found.name == \"Alice\"\n```\n\n## Resources\n\n- Supertest: https:\u002F\u002Fgithub.com\u002Fladjs\u002Fsupertest\n- Testcontainers: https:\u002F\u002Ftestcontainers.com\u002F\n- pytest database fixtures: https:\u002F\u002Fdocs.pytest.org\u002Fen\u002Fstable\u002Fhow-to\u002Ffixtures.html\n- Docker Compose for testing: https:\u002F\u002Fdocs.docker.com\u002Fcompose\u002Fuse-cases\u002F#testing\n- Integration testing strategies: https:\u002F\u002Fmartinfowler.com\u002Fbliki\u002FIntegrationTest.html",{"name":5,"author":24,"license":15,"version":25,"description":26,"allowed-tools":27,"compatible-with":28},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Execute integration tests validating component interactions and system integration.\nUse when performing specialized testing.\nTrigger with phrases like \"run integration tests\", \"test integration\", or \"validate component interactions\".\n","Read, Write, Edit, Grep, Glob, Bash(test:integration-*)","claude-code, codex, openclaw","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill running-integration-tests",{"tool":41,"command":42},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill running-integration-tests",{"tool":44,"command":45},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill running-integration-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Frunning-integration-tests\u002FSKILL.md",true,[49,55,61],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002FREADME.md","ASSET","资产文件",203,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Frunning-integration-tests\u002Fassets\u002FREADME.md",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002FREADME.md","REFERENCE","参考文档",67,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Frunning-integration-tests\u002Freferences\u002FREADME.md",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"scripts\u002FREADME.md","SCRIPT","脚本",577,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Frunning-integration-tests\u002Fscripts\u002FREADME.md",[68,75,82,89,96,104],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]