Loading...
Loading...
Found 130 Skills
pytest Python testing framework with fixtures. Use for Python testing.
How to test domain models effectively: value object testing (immutability, validation), entity testing (identity, business logic), domain exception testing, aggregate testing, high coverage patterns (95%+), and testing invariants and constraints. Use when: Testing domain layer code, validating value objects, testing entities with business logic, ensuring domain invariants, or achieving 95%+ coverage on domain models.
Testing use cases and application services: use case testing with mocked gateways, DTO testing, application exception testing, orchestration testing, mocking at adapter boundaries. Coverage target: 85-90%. Use when: Testing use cases, testing application services, testing DTOs and data transformation, testing error handling in use cases, mocking external dependencies at layer boundaries.
Provides Complete patterns for testing async Python code with pytest: pytest-asyncio configuration, AsyncMock usage, async fixtures, testing FastAPI with AsyncClient, testing Kafka async producers/consumers, event loop and cleanup patterns. Use when: Testing async functions, async use cases, FastAPI endpoints, async database operations, Kafka async clients, or any async/await code patterns.
Create comprehensive unit tests, integration tests, and end-to-end tests using pytest for Python projects. Specializes in FastAPI testing with TestClient, async testing with pytest-asyncio, SQLModel/SQLAlchemy database testing, fixture generation, and test configuration setup. Use when you need test coverage, want to implement TDD/BDD, create test suites for functions or API endpoints, add edge case testing, or improve code quality with automated testing. Triggers include requests like "write tests for this module", "create pytest fixtures", "test this FastAPI endpoint", "setup pytest configuration", or "generate test file".
pytest testing patterns for Python. Triggers on: pytest, fixture, mark, parametrize, mock, conftest, test coverage, unit test, integration test, pytest.raises.
Analyze and optimize pytest suites to improve speed, identify flaky tests, and increase coverage. Use to maintain high-quality, fast-running test pipelines.
Use when advanced Pytest features including markers, custom assertions, hooks, and coverage configuration.
Pytest testing patterns for Python. Trigger: When writing or refactoring pytest tests (fixtures, mocking, parametrize, markers). For Prowler-specific API/SDK testing conventions, also use prowler-test-api or prowler-test-sdk.
Write pytest tests with fixtures, parametrization, mocking, async testing, and modern patterns. Use when creating or updating Python test files. Not for unittest — use standard library patterns instead.
Comprehensive pytest testing guide for FastAPI backends. Covers unit testing, integration testing, async patterns, mocking, fixtures, coverage, and FastAPI-specific testing with TestClient. Use when writing or updating test code for backend services, repositories, or API routes.
Creates pytest fixtures following project patterns including factory fixtures, async fixtures, and multi-layer organization. Use when setting up test fixtures, creating test data, organizing test utilities, or structuring conftest.py files. Works with Python test files, pytest configuration, and .py test utilities.