Run DAPR-aware tests with mocked clients, Testcontainers integration, or real DAPR sidecar
Executes DAPR tests with mocked clients, Testcontainers, or real sidecar integration.
/plugin marketplace add Sahib-Sawhney-WH/sahibs-claude-plugin-marketplace/plugin install dapr@sahib-claude-marketplaceRun tests for your DAPR application with proper mocking and integration support.
When the user runs /dapr:test:
Detect Test Type
Configure Environment
Run Tests
| Argument | Description |
|---|---|
unit | Run unit tests with mocked DAPR client (default) |
integration | Run integration tests with Testcontainers |
e2e | Run end-to-end tests with real DAPR sidecar |
--coverage | Generate coverage report |
--verbose | Verbose output |
--filter | Filter tests by pattern |
/dapr:test unit
Uses mocked DAPR client for fast, isolated tests:
/dapr:test integration
Uses Testcontainers for realistic testing:
/dapr:test e2e
Uses real DAPR sidecar:
tests/
├── conftest.py # Shared fixtures
├── unit/
│ ├── test_state.py # State management tests
│ ├── test_pubsub.py # Pub/sub tests
│ └── test_service.py # Service invocation tests
├── integration/
│ └── test_e2e.py # Integration tests
└── docker-compose.test.yaml
/dapr:test
/dapr:test --coverage
/dapr:test --filter test_order_creation
/dapr:test integration --verbose
When setting up tests, creates:
tests/conftest.py - DAPR fixturestests/unit/test_example.py - Example unit teststests/docker-compose.test.yaml - Test infrastructurepytest.ini - Pytest configuration