Documentation
¶
Overview ¶
Package json provides JSON file-based result storage for Arena. This package implements the ResultRepository interface to save Arena test results as individual JSON files plus an index summary file, maintaining backward compatibility with existing Arena output format.
Index ¶
- type JSONResultRepository
- func (r *JSONResultRepository) GetOutputDir() string
- func (r *JSONResultRepository) GetSummary() (map[string]interface{}, error)
- func (r *JSONResultRepository) ListResults() ([]string, error)
- func (r *JSONResultRepository) LoadResults() ([]engine.RunResult, error)
- func (r *JSONResultRepository) SaveResult(result *engine.RunResult) error
- func (r *JSONResultRepository) SaveResults(runResults []engine.RunResult) error
- func (r *JSONResultRepository) SaveSummary(summary *results.ResultSummary) error
- func (r *JSONResultRepository) SupportsStreaming() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONResultRepository ¶
type JSONResultRepository struct {
// contains filtered or unexported fields
}
JSONResultRepository stores results as JSON files (one per result + index). This matches the existing Arena output format for backward compatibility.
func NewJSONResultRepository ¶
func NewJSONResultRepository(outputDir string) *JSONResultRepository
NewJSONResultRepository creates a new JSON result repository that writes to the specified output directory.
func (*JSONResultRepository) GetOutputDir ¶
func (r *JSONResultRepository) GetOutputDir() string
GetOutputDir returns the output directory for this repository
func (*JSONResultRepository) GetSummary ¶
func (r *JSONResultRepository) GetSummary() (map[string]interface{}, error)
GetSummary loads and returns the summary from index.json
func (*JSONResultRepository) ListResults ¶
func (r *JSONResultRepository) ListResults() ([]string, error)
ListResults returns a list of all result files in the output directory
func (*JSONResultRepository) LoadResults ¶
func (r *JSONResultRepository) LoadResults() ([]engine.RunResult, error)
LoadResults loads previously saved results from JSON files
func (*JSONResultRepository) SaveResult ¶
func (r *JSONResultRepository) SaveResult(result *engine.RunResult) error
SaveResult saves a single result immediately (for streaming support)
func (*JSONResultRepository) SaveResults ¶
func (r *JSONResultRepository) SaveResults(runResults []engine.RunResult) error
SaveResults saves all results as individual JSON files plus an index summary. This maintains backward compatibility with existing Arena JSON output format.
func (*JSONResultRepository) SaveSummary ¶
func (r *JSONResultRepository) SaveSummary(summary *results.ResultSummary) error
SaveSummary saves a summary of all test results as index.json
func (*JSONResultRepository) SupportsStreaming ¶
func (r *JSONResultRepository) SupportsStreaming() bool
SupportsStreaming returns true as JSON files can be written incrementally