@@ -720,26 +720,101 @@ HTML Reporter Plugin for CodeceptJS
720720
721721Generates comprehensive HTML reports showing:
722722
723- - Test statistics
724- - Feature/Scenario details
725- - Individual step results
726- - Test artifacts (screenshots, etc.)
723+ - **Interactive Test Results**: Click-to-expand test details with comprehensive information
724+ - **Step-by-Step Details**: Shows individual test steps with proper method names (e.g., ` I .seeFile ()` , ` I .amInPath ()` ), status indicators, and timing
725+ - **Test Statistics**: Visual cards displaying totals, passed, failed, and pending test counts with interactive pie chart
726+ - **Error Information**: Clean, formatted error messages for failed tests with ANSI color code stripping
727+ - **Artifacts Support**: Display screenshots and other test artifacts with modal viewing capability
728+ - **Responsive Design**: Mobile-friendly layout that works across all screen sizes
729+ - **Professional Styling**: Modern, clean interface with color-coded status indicators
730+ - **Enhanced Features**:
731+ - **Metadata Display**: Shows test metadata, options, and custom properties
732+ - **Tags Support**: Display and filter by test tags (@smoke, @critical, etc.)
733+ - **Retry Tracking**: Shows retry attempts and final test status
734+ - **Test Notes**: Display test notes and comments
735+ - **Interactive Filters**: Filter tests by status, feature, tags, and retry status
736+ - **Test History**: Track test results across multiple runs with visual charts
737+ - **Stats Export**: Export test statistics in JSON format for integration with external tools (Grafana, etc.)
738+ - **Worker Support**: Compatible with run-workers and run-multiple commands
727739
728740## Configuration
729741
730742` ` ` js
731743" plugins" : {
732744 " htmlReporter" : {
733745 " enabled" : true ,
734- " output" : " ./output" ,
735- " reportFileName" : " report.html" ,
736- " includeArtifacts" : true ,
737- " showSteps" : true ,
738- " showSkipped" : true
746+ " output" : " ./output" , // Directory for the report
747+ " reportFileName" : " report.html" , // Name of the HTML file
748+ " includeArtifacts" : true , // Include screenshots/artifacts
749+ " showSteps" : true , // Show individual test steps
750+ " showSkipped" : true , // Show skipped tests
751+ " showMetadata" : true , // Show test metadata and options
752+ " showTags" : true , // Show test tags
753+ " showRetries" : true , // Show retry information
754+ " exportStats" : false , // Export stats to JSON file
755+ " exportStatsPath" : " ./stats.json" , // Path for stats export
756+ " keepHistory" : false , // Track test history
757+ " historyPath" : " ./test-history.json" , // Path for history file
758+ " maxHistoryEntries" : 50 // Max history entries to keep
739759 }
740760}
741761` ` `
742762
763+ ### Usage
764+
765+ Run tests normally and the HTML report will be automatically generated:
766+
767+ ` ` ` bash
768+ npx codeceptjs run
769+ ` ` `
770+
771+ The generated HTML report includes:
772+
773+ - **Filter Controls**: Interactive filtering by status, feature, tags, and retry status
774+ - **Test History Chart**: Visual representation of test results over time (when history is enabled)
775+ - **Detailed Test Information**: Expandable sections showing steps, hooks, metadata, and artifacts
776+ - **Export Integration**: JSON stats export for external analysis tools
777+
778+ ### Stats Export for Grafana Integration
779+
780+ Enable stats export to integrate with monitoring tools:
781+
782+ ` ` ` js
783+ " htmlReporter" : {
784+ " enabled" : true ,
785+ " exportStats" : true ,
786+ " exportStatsPath" : " ./test-stats.json"
787+ }
788+ ` ` `
789+
790+ The exported JSON contains structured data perfect for Grafana dashboards:
791+
792+ - Test execution metrics
793+ - Pass/fail rates over time
794+ - Individual test performance data
795+ - Retry statistics
796+ - Test metadata for grouping and filtering
797+
798+ ### History Tracking
799+
800+ Track test trends across multiple runs:
801+
802+ ` ` ` js
803+ " htmlReporter" : {
804+ " enabled" : true ,
805+ " keepHistory" : true ,
806+ " historyPath" : " ./test-history.json" ,
807+ " maxHistoryEntries" : 100
808+ }
809+ ` ` `
810+
811+ History tracking provides:
812+
813+ - Test result trends over time
814+ - Performance regression detection
815+ - Visual charts in the HTML report
816+ - JSON data for external analysis
817+
743818### Parameters
744819
745820- ` config`  
0 commit comments