Run Integration Tests Across All Migrated Components
Objective
Verify that all migrations work correctly through comprehensive integration testing across the entire ecosystem.
Test Suites to Run
1. Contract Testing
-
All OpenAPI specs valid -
Specs match implementation -
Contract tests pass in each project -
No breaking changes in APIs
2. Service Integration Tests
agent-router (apidog service)
```bash cd /Users/flux423/Sites/LLM/common_npm/agent-router npm test:apidog npm test:e2e
Test apidog batch import
curl -X POST http://localhost:3000/api/v1/apidog/batch/plan curl -X POST http://localhost:3000/api/v1/apidog/batch/execute ```
studio-ui (design-system API)
```bash cd /Users/flux423/Sites/LLM/common_npm/studio-ui npm run test:design-api npm run test:integration
Test design system endpoints
curl http://localhost:3001/api/v1/design/tokens curl http://localhost:3001/api/v1/design/tokens/colors curl http://localhost:3001/api/v1/design/components ```
3. Cross-Project Integration
Test OpenAPI Spec Loading
```typescript // agent-router loads specs from distributed locations import { PlatformAPILoader } from './services/platform-api-loader';
const loader = new PlatformAPILoader(); const specs = await loader.loadAllSpecs();
// Should load from npm packages assert(specs['studio-ui'] !== undefined); assert(specs['agent-mesh'] !== undefined); ```
Test Design Token Imports
```typescript // Projects import tokens from technical-guide import { colors, typography } from '@bluefly/technical-guide/tokens';
assert(colors.primary[600] === '#1976d2'); assert(typography.sizes.md === '1rem'); ```
4. CLI Command Testing
agent-buildkit apidog commands
```bash cd /Users/flux423/Sites/LLM/agent-buildkit
Test new apidog commands
buildkit apidog validate --spec test/fixtures/openapi.yaml buildkit apidog sync --dry-run ```
technical-guide validators
```bash cd /Users/flux423/Sites/LLM/technical-guide
Test validation commands
technical-guide validate-brand test/fixtures/design.json technical-guide validate-api test/fixtures/openapi.yaml ```
5. CI/CD Pipeline Tests
-
All project pipelines pass -
Standards validation works -
Automated publishing works -
Wiki sync automation works
6. Visual Regression Tests
-
studio-ui components render correctly -
Design tokens apply correctly -
No visual breaking changes -
Themes work (light/dark)
7. Performance Tests
-
API response times acceptable -
Spec loading performant -
gRPC streaming works efficiently -
No memory leaks
Integration Test Scenarios
Scenario 1: End-to-End API Publishing
- Developer updates OpenAPI spec in their project
- CI validates spec using technical-guide validators
- Spec is published with npm package
- agent-router loads updated spec
- apidog-sync publishes to Apidog platform
Scenario 2: Design Token Update
- Update token in technical-guide
- Publish @bluefly/technical-guide package
- Dependent projects update dependency
- Components re-render with new tokens
- Visual regression tests verify changes
Scenario 3: New Service Registration
- Create new microservice with OpenAPI spec
- Run
buildkit openapi discover
- Registry index updates automatically
- agent-router loads new service
- Service appears in API documentation
Test Execution Plan
Phase 1: Unit Tests (Per Project)
```bash for project in common_npm/*/; do cd "" npm test cd - done ```
Phase 2: Integration Tests
```bash
Start all services
buildkit services start-all
Run integration test suite
npm run test:integration:all
Verify health
buildkit services health ```
Phase 3: E2E Tests
```bash
Run playwright E2E tests
npm run test:e2e:technical-guide ```
Verification Checklist
Services
-
agent-router apidog endpoints working -
studio-ui design-system API working -
All 15+ microservices routing correctly -
gRPC streaming functional
OpenAPI
-
All specs load from distributed locations -
Registry index accurate -
Contract tests pass -
Spec validation enforced
Design Tokens
-
All projects importing tokens -
No hardcoded values found -
Visual appearance correct -
Themes working
CLI Commands
-
apidog commands work -
Validators enforce standards -
OpenAPI discovery works -
All buildkit commands functional
CI/CD
-
All pipelines green -
Automated publishing works -
Quality gates enforced -
Wiki sync working
Test Reports
-
Generate test coverage report -
Document any issues found -
Create issues for bugs -
Performance benchmarks
Related
- Epic: #1
- Depends on: #14 (cleanup complete)
- Next: #17 (publish package)
- Blocks: #17 (must pass before publishing)
Success Criteria
-
✅ All tests passing -
✅ No regression in functionality -
✅ Performance acceptable -
✅ No breaking changes -
✅ Integration scenarios work end-to-end -
✅ CI/CD pipelines green -
✅ Ready for production