Documentation
¶
Index ¶
- func AggregateVerdict(assertions []AssertionResult) validators.Status
- func ImageReferenceURLs(value any) []string
- type AssertionResult
- type Engine
- type EvidenceMap
- type EvidenceRecord
- type EvidenceResult
- type ExecutedCheck
- type ExecutedEvidence
- type ExecutedTest
- type FailureReason
- type Presentation
- type PresentationFilter
- type PresentationScreenshot
- type Report
- type Summary
- type TestFailure
- type TestOutcome
- type TestResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateVerdict ¶
func AggregateVerdict(assertions []AssertionResult) validators.Status
func ImageReferenceURLs ¶
ImageReferenceURLs collects every image reference URL inside an evidence value, depth-first, deduplicated and in stable order.
Types ¶
type AssertionResult ¶
type AssertionResult struct {
ID string `json:"id"`
Validator string `json:"validator"`
Input string `json:"input"`
Status validators.Status `json:"status"`
Message string `json:"message,omitempty"`
Details map[string]any `json:"details,omitempty"`
EvidenceKeys []string `json:"evidence_keys,omitempty"`
}
type EvidenceMap ¶
type EvidenceMap map[string]EvidenceRecord
type EvidenceRecord ¶
type EvidenceResult ¶
type ExecutedCheck ¶
type ExecutedEvidence ¶
type ExecutedEvidence struct {
Name string `json:"name"`
SourceNode string `json:"source_node,omitempty"`
Visual []string `json:"visual,omitempty"`
}
ExecutedEvidence records which evidence a test consumed. The flat report evidence map keeps only one record per name, so per-test consumers such as the PDF and the webapp sheet must use this list to attach the right scenario's artifacts to each test.
type ExecutedTest ¶
type ExecutedTest struct {
TestID string `json:"test_id"`
Title string `json:"title,omitempty"`
SourceURL string `json:"source_url,omitempty"`
Status string `json:"status"`
Assertions []ExecutedCheck `json:"assertions,omitempty"`
Evidence []ExecutedEvidence `json:"evidence,omitempty"`
Outcome TestOutcome `json:"outcome"`
}
type FailureReason ¶
type FailureReason struct {
Scope string `json:"scope"`
ID string `json:"id"`
Status validators.Status `json:"status"`
Message string `json:"message,omitempty"`
}
type Presentation ¶
type Presentation struct {
Deeplink string `json:"deeplink,omitempty"`
Screenshots []PresentationScreenshot `json:"screenshots,omitempty"`
SummaryFilters []PresentationFilter `json:"summary_filters,omitempty"`
}
Presentation is the display projection nested inside an FCAF assessment report.
func BuildPresentation ¶
func BuildPresentation(report Report, maestroURLs []string) Presentation
BuildPresentation builds the display projection for an FCAF assessment report.
type PresentationFilter ¶
type PresentationFilter struct {
Key string `json:"key"`
Label string `json:"label"`
Count int `json:"count"`
}
PresentationFilter is a non-empty summary count aligned to an executed status.
type PresentationScreenshot ¶
type PresentationScreenshot struct {
URL string `json:"url"`
Label string `json:"label"`
TestIDs []string `json:"test_ids,omitempty"`
}
PresentationScreenshot identifies an image and the tests that use it as visual evidence.
type Report ¶
type Report struct {
Suite string `json:"suite,omitempty"`
SelectedTestIDs []string `json:"selected_test_ids,omitempty"`
Status string `json:"status,omitempty"`
Tests []TestResult `json:"tests,omitempty"`
ExecutedTests []ExecutedTest `json:"executed_tests,omitempty"`
Evidence EvidenceMap `json:"evidence,omitempty"`
Summary Summary `json:"summary"`
Failures []TestFailure `json:"failures,omitempty"`
Presentation *Presentation `json:"presentation,omitempty"`
}
func (*Report) AttachPresentation ¶
AttachPresentation builds and stores the report's display projection.
func (Report) HasNonPassingTests ¶
func (*Report) PopulateDerivedViews ¶
func (r *Report) PopulateDerivedViews()
func (*Report) PopulateEvidence ¶
func (r *Report) PopulateEvidence()
func (*Report) PopulateExecutedTests ¶
func (r *Report) PopulateExecutedTests()
func (*Report) PopulateFailures ¶
func (r *Report) PopulateFailures()
func (Report) PublicReport ¶
type TestFailure ¶
type TestFailure struct {
TestID string `json:"test_id"`
Title string `json:"title,omitempty"`
Status validators.Status `json:"status"`
Reasons []FailureReason `json:"reasons"`
Message string `json:"message,omitempty"`
}
type TestOutcome ¶
type TestResult ¶
type TestResult struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Status validators.Status `json:"status"`
Suite dsl.Suite `json:"suite"`
Assertions []AssertionResult `json:"assertions"`
NormativeReferences []dsl.NormativeReference `json:"normative_references"`
Evidence []EvidenceResult `json:"evidence,omitempty"`
Message string `json:"message,omitempty"`
}