PacketFlow.Component.Testing (packetflow v0.1.0)
Component testing interfaces for automated testing
This module provides:
- Component test suite generation
- Integration testing utilities
- Mock and stub implementations
- Test data factories
- Performance testing tools
- Test reporting and analysis
Summary
Functions
Create a mock component for testing
Create a test case
Create test data factory for a component
Create a test suite for a component
Generate test data using a factory
Generate test report in various formats
Run integration tests between components
Run performance tests for a component
Run a single test case
Run a test suite
Types
@type test_report() :: %{ suite: test_suite(), results: [test_result()], summary: %{ total: integer(), passed: integer(), failed: integer(), skipped: integer(), timeout: integer(), total_duration_ms: number() }, timestamp: integer() }
Functions
Create a mock component for testing
Create a test case
Create test data factory for a component
@spec create_test_suite(String.t(), atom(), [test_case()], keyword()) :: test_suite()
Create a test suite for a component
Generate test data using a factory
@spec generate_test_report(test_report(), atom()) :: String.t() | map()
Generate test report in various formats
@spec run_integration_tests([atom()], [test_case()]) :: test_report()
Run integration tests between components
Run performance tests for a component
@spec run_test_case(test_case()) :: test_result()
Run a single test case
@spec run_test_suite(test_suite()) :: test_report()
Run a test suite