Integration Testing Scaffolding
Scaffolds an integration testing component with test infrastructure for verifying component interactions against real dependencies.
Input
Invoked by the scaffolding orchestrator with:
component_name: Name of the testing componentproject_name: Project name from settingsexisting_components: Currently configured components (servers, databases)
Directory Structure
components/testing/integration/{name}/
├── src/
│ ├── setup/
│ │ ├── test-database.ts # Test database lifecycle
│ │ └── test-server.ts # Test server lifecycle
│ ├── helpers/
│ │ ├── api-client.ts # HTTP client for API testing
│ │ └── fixtures.ts # Test data factories
│ └── tests/
│ └── .gitkeep
├── vitest.config.ts
├── package.json
├── tsconfig.json
└── README.md
Workflow
- Create the testing directory structure
- Generate test setup files based on existing components:
- For each server: create API client helper
- For each database: create test database lifecycle (setup/teardown)
- Configure Vitest for integration test patterns
- Generate Testkube test suite definition (if helm components exist)
- Create README with testing conventions
Standards
Follow integration-testing-standards for test structure, database lifecycle, and naming conventions.
Output
Returns a declared actions response with register_component action for the new integration testing component.