reporter

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package reporter generates test reports in various formats (console, JSON, HTML).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter generates test reports in various formats

func New

func New(results *domain.TestResults) *Reporter

New creates a new report generator

func (*Reporter) GenerateHTML

func (r *Reporter) GenerateHTML(outputPath string) error

GenerateHTML creates an HTML report with interactive charts

func (*Reporter) GenerateJSON

func (r *Reporter) GenerateJSON(outputPath string) error

GenerateJSON creates a JSON report

func (*Reporter) PrintSummary

func (r *Reporter) PrintSummary()

PrintSummary prints a console summary of the results

type SlowRequestEntry

type SlowRequestEntry struct {
	URL          string
	ResponseTime string
	StatusCode   int
	StatusGroup  string
}

SlowRequestEntry represents a slow request for template rendering.

type StatusDistributionEntry

type StatusDistributionEntry struct {
	StatusCode  int
	Count       int
	Percentage  float64
	StatusGroup string
}

StatusDistributionEntry represents a single status code distribution entry for templates.

type TemplateData

type TemplateData struct {
	Timestamp           string
	Duration            string
	TotalRequests       int64
	SuccessfulRequests  int64
	FailedRequests      int64
	URLsDiscovered      int
	SuccessRate         float64
	SuccessRateClass    string
	RequestsPerSecond   float64
	AverageResponseTime string
	StatusDistribution  []StatusDistributionEntry
	URLValidations      []URLValidationEntry
	SlowRequests        []SlowRequestEntry
	Errors              []domain.ErrorInfo
	ResponseTimesMs     []float64
}

TemplateData contains all data needed for HTML template rendering.

type URLValidationEntry

type URLValidationEntry struct {
	URL           string
	StatusCode    int
	StatusGroup   string
	ResponseTime  string
	ContentLength int64
	LinksFound    int
	Depth         int
}

URLValidationEntry represents a URL validation result for template rendering.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL