This skill provides comprehensive end-to-end (E2E) testing for TypeScript and NestJS applications using real Docker infrastructure. It is suited for developers looking to implement robust testing practices with guided workflows and real service interactions.
$ npx skills add https://github.com/bmad-labs/skills --skill typescript-e2e-testingThe typescript-e2e-testing skill provides comprehensive end-to-end testing capabilities for TypeScript and NestJS applications by leveraging real Docker infrastructure. It enables developers to test against actual service dependencies including Kafka, PostgreSQL, MongoDB, and Redis, moving beyond mocked interactions to validate real system behavior. This approach catches integration issues that unit tests miss by running tests in environments that closely mirror production. The skill is designed for teams implementing robust testing practices who need guided workflows and confidence that their services work correctly together.
Install using the command: `$ npx skills add https://github.com/bmad-labs/skills --skill typescript-e2e-testing`
Set up E2E testing infrastructure for new or existing projects.
Create E2E test cases following the Given-When-Then (GWT) pattern.
Review and ensure the quality of existing E2E tests.
Run E2E tests with proper verification against real services.
$ npx skills add https://github.com/bmad-labs/skills --skill typescript-e2e-testinggit clone https://github.com/bmad-labs/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Write a comprehensive end-to-end (E2E) test suite for a [COMPANY]'s [INDUSTRY] application built with TypeScript and NestJS. Use Docker to spin up the required services (e.g., PostgreSQL, Redis, RabbitMQ) and execute real API calls against the running application. Include tests for: 1) API endpoints, 2) database interactions, 3) message brokers, 4) authentication flows, and 5) error handling. Ensure tests are isolated, deterministic, and include setup/teardown logic. [DATA] should be mocked where necessary but prioritize real service interactions. Provide a test report in JUnit format for CI/CD integration.
# E2E Test Suite for Acme Corp's Payment Processing API
## Setup & Teardown
```bash
docker-compose -f docker-compose.test.yml up -d postgres redis rabbitmq
yarn test:e2e:setup
```
## Test Results (JUnit Format)
```xml
<testsuite name="Payment API E2E Tests" tests="15" failures="1" errors="0" skipped="0">
<testcase name="POST /payments should create a new payment" time="125ms"/>
<testcase name="GET /payments/:id should return payment details" time="89ms"/>
<testcase name="POST /payments should fail with invalid data" time="45ms">
<failure message="Expected 400 Bad Request, got 200 OK"/>
</testcase>
<testcase name="RabbitMQ payment event should be published" time="210ms"/>
</testsuite>
```
## Key Findings
- **Critical**: Payment creation endpoint lacks input validation (see test failure above)
- **Warning**: Redis connection occasionally times out in CI (10% failure rate)
- **Success**: All message broker tests pass with real RabbitMQ interactions
## Next Steps
1. Add input validation middleware to `/payments` POST endpoint
2. Increase Redis connection timeout to 5s
3. Investigate flaky test in CI pipelineTake a free 3-minute scan and get personalized AI skill recommendations.
Take free scan