Documentation
¶
Index ¶
- Constants
- func IsUUID(value string) bool
- func RoundLatencyMilliseconds(value float64) float64
- func ValidateSuiteInputs(inputs []SuiteInput) error
- type AssertionKind
- type CaseExecutionMode
- type CaseRef
- type CaseRevisionRef
- type CaseSeverity
- type CaseType
- type Channel
- type ChannelModel
- type ChannelSnapshot
- type Comparison
- func (comparison Comparison) MarshalJSON() ([]byte, error)
- func (comparison Comparison) Meta() EntityMeta
- func (comparison Comparison) Model() EntityRevisionRef
- func (comparison Comparison) Plan() EntityRevisionRef
- func (comparison Comparison) Runs() []ComparisonRunRef
- func (comparison Comparison) Status() ComparisonStatus
- func (comparison Comparison) Transition(next ComparisonStatus, at time.Time) (Comparison, error)
- func (comparison *Comparison) UnmarshalJSON(data []byte) error
- func (comparison Comparison) Validate() error
- type ComparisonRunRef
- type ComparisonStatus
- type CredentialPurpose
- type CredentialRef
- type EntityMeta
- type EntityRevisionRef
- type EntryExecutionStatus
- type EntryReport
- type EntryReportStatus
- type EnvironmentSnapshot
- type ErrorCode
- type Evidence
- type ExecutionOrigin
- type ExecutionStatus
- type FailureKind
- type Integration
- type IntegrationConfig
- type IntegrationKind
- type LoadMode
- type LoadProfile
- type MetricValue
- type Model
- type ModelSnapshot
- type PerformancePlanProfile
- type Plan
- type PlanEntry
- type PlanTargetKind
- type Protocol
- type ProtocolDefinitions
- type ProviderDetail
- type QuickTaskSnapshot
- type Report
- type ReportAttachment
- type ReportConclusion
- type ReportSubject
- type RequestMethod
- type Result
- type Run
- func (run Run) Channel() ChannelSnapshot
- func (run Run) Fail(failure RunFailure, at time.Time) (Run, error)
- func (run Run) Failure() *RunFailure
- func (run Run) MarshalJSON() ([]byte, error)
- func (run Run) Meta() EntityMeta
- func (run Run) PlanID() string
- func (run Run) Seed() uint64
- func (run Run) Snapshot() RunSnapshot
- func (run Run) Status() RunStatus
- func (run Run) Transition(next RunStatus, at time.Time) (Run, error)
- func (run *Run) UnmarshalJSON(data []byte) error
- func (run Run) Validate() error
- type RunEntrySnapshot
- type RunFailure
- type RunSnapshot
- type RunStatus
- type SLAProfile
- type StreamCompletionExpectation
- type Suite
- func (suite Suite) AcceptsCase(testCase TestCase) bool
- func (suite Suite) HasFileInputs() bool
- func (suite Suite) ResolveInputs(values map[string]json.RawMessage) (map[string]json.RawMessage, map[string]map[string]json.RawMessage, error)
- func (suite Suite) Validate() error
- func (suite Suite) ValidateCases(cases []TestCase) error
- type SuiteInput
- type SuiteInputBinding
- type TestAssertion
- type TestCase
- type TestExpected
- type TestRequest
- type VerificationSummary
Constants ¶
const ( MaxErrorCodeLength = 64 MaxProviderDetailLength = 2048 // SLAPrecisionDimension versions comparison semantics without rewriting // historical observations or rounding the stored measurements themselves. SLAPrecisionDimension = "sla_precision" SLALatencyTwoDecimalsV1 = "latency_2dp_v1" )
const CurrentEntitySchemaVersion = 1
const CurrentReportSchemaVersion = 1
const CurrentRunSnapshotSchemaVersion = 1
Variables ¶
This section is empty.
Functions ¶
func RoundLatencyMilliseconds ¶
RoundLatencyMilliseconds applies the shared decimal precision for latency verdicts.
func ValidateSuiteInputs ¶
func ValidateSuiteInputs(inputs []SuiteInput) error
Types ¶
type AssertionKind ¶
type AssertionKind string
const ( AssertionResponseSchema AssertionKind = "response_schema" AssertionStreamEnd AssertionKind = "stream_end" AssertionText AssertionKind = "text" AssertionJSON AssertionKind = "json" AssertionToolCall AssertionKind = "tool_call" AssertionMultimodal AssertionKind = "multimodal" AssertionCustom AssertionKind = "custom" )
type CaseExecutionMode ¶
type CaseExecutionMode string
const ( CaseExecutionAutomatic CaseExecutionMode = "automatic" CaseExecutionManual CaseExecutionMode = "manual" )
func (CaseExecutionMode) Validate ¶
func (mode CaseExecutionMode) Validate() error
type CaseRef ¶
type CaseRef struct {
CaseID string `json:"case_id"`
}
CaseRef is an authored reference. Content revisions are captured only in Run snapshots.
type CaseRevisionRef ¶
func (CaseRevisionRef) Validate ¶
func (ref CaseRevisionRef) Validate() error
type CaseSeverity ¶
type CaseSeverity string
const ( CaseSeverityNormal CaseSeverity = "normal" CaseSeverityCritical CaseSeverity = "critical" )
func (CaseSeverity) Validate ¶
func (severity CaseSeverity) Validate() error
type Channel ¶
type Channel struct {
EntityMeta
Name string `json:"name"`
BaseURL string `json:"base_url"`
Enabled bool `json:"enabled"`
CredentialID string `json:"credential_id,omitempty"`
}
type ChannelModel ¶
type ChannelModel struct {
EntityMeta
Protocols []Protocol `json:"protocols"`
ChannelID string `json:"channel_id"`
ModelID string `json:"model_id"`
UpstreamModelName string `json:"upstream_model_name"`
}
func (ChannelModel) SupportsProtocol ¶
func (mapping ChannelModel) SupportsProtocol(value Protocol) bool
func (ChannelModel) Validate ¶
func (mapping ChannelModel) Validate() error
type ChannelSnapshot ¶
type ChannelSnapshot struct {
EntityRevisionRef
Name string `json:"name"`
BaseURL string `json:"base_url"`
Protocol Protocol `json:"protocol"`
UpstreamModelName string `json:"upstream_model_name"`
}
func (ChannelSnapshot) Validate ¶
func (snapshot ChannelSnapshot) Validate() error
type Comparison ¶
type Comparison struct {
// contains filtered or unexported fields
}
func NewComparison ¶
func NewComparison(meta EntityMeta, plan, model EntityRevisionRef, runs []ComparisonRunRef) (Comparison, error)
func (Comparison) MarshalJSON ¶
func (comparison Comparison) MarshalJSON() ([]byte, error)
func (Comparison) Meta ¶
func (comparison Comparison) Meta() EntityMeta
func (Comparison) Model ¶
func (comparison Comparison) Model() EntityRevisionRef
func (Comparison) Plan ¶
func (comparison Comparison) Plan() EntityRevisionRef
func (Comparison) Runs ¶
func (comparison Comparison) Runs() []ComparisonRunRef
func (Comparison) Status ¶
func (comparison Comparison) Status() ComparisonStatus
func (Comparison) Transition ¶
func (comparison Comparison) Transition(next ComparisonStatus, at time.Time) (Comparison, error)
func (*Comparison) UnmarshalJSON ¶
func (comparison *Comparison) UnmarshalJSON(data []byte) error
func (Comparison) Validate ¶
func (comparison Comparison) Validate() error
type ComparisonRunRef ¶
type ComparisonRunRef struct {
Channel EntityRevisionRef `json:"channel"`
RunID string `json:"run_id"`
}
type ComparisonStatus ¶
type ComparisonStatus string
const ( ComparisonRunning ComparisonStatus = "running" ComparisonCompleted ComparisonStatus = "completed" ComparisonFailed ComparisonStatus = "failed" ComparisonCancelled ComparisonStatus = "cancelled" )
type CredentialPurpose ¶
type CredentialPurpose string
const ( CredentialChannelAPIKey CredentialPurpose = "channel_api_key" CredentialQuickTaskAPIKey CredentialPurpose = "quick_task_api_key" CredentialIntegrationAdmin CredentialPurpose = "integration_admin" CredentialSSHPassword CredentialPurpose = "ssh_password" CredentialSSHPrivateKey CredentialPurpose = "ssh_private_key" CredentialSSHPassphrase CredentialPurpose = "ssh_passphrase" CredentialRunnerToken CredentialPurpose = "runner_token" )
func (CredentialPurpose) Validate ¶
func (purpose CredentialPurpose) Validate() error
type CredentialRef ¶
type CredentialRef struct {
EntityMeta
StoreRef string `json:"store_ref"`
Purpose CredentialPurpose `json:"purpose"`
MaskedSuffix string `json:"masked_suffix"`
Fingerprint string `json:"fingerprint"`
}
func (CredentialRef) Validate ¶
func (ref CredentialRef) Validate() error
type EntityMeta ¶
type EntityMeta struct {
ID string `json:"id"`
SchemaVersion int `json:"schema_version"`
Revision uint64 `json:"revision"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func NewEntityMeta ¶
func NewEntityMeta(now time.Time) (EntityMeta, error)
func (EntityMeta) NextRevision ¶
func (meta EntityMeta) NextRevision(now time.Time) (EntityMeta, error)
func (EntityMeta) Validate ¶
func (meta EntityMeta) Validate() error
type EntityRevisionRef ¶
func (EntityRevisionRef) Validate ¶
func (ref EntityRevisionRef) Validate(kind string) error
type EntryExecutionStatus ¶
type EntryExecutionStatus string
const ( EntryExecutionCompleted EntryExecutionStatus = "completed" EntryExecutionFailed EntryExecutionStatus = "failed" )
func (EntryExecutionStatus) Validate ¶
func (status EntryExecutionStatus) Validate() error
type EntryReport ¶
type EntryReport struct {
PerformanceContext map[string]string `json:"performance_context,omitempty"`
Performance json.RawMessage `json:"performance,omitempty"`
WarmupCount uint32 `json:"warmup_count"`
Settings testspec.RunSettings `json:"settings"`
EntryID string `json:"entry_id"`
TargetKind PlanTargetKind `json:"target_kind"`
TargetID string `json:"target_id"`
Name string `json:"name"`
Key string `json:"key"`
Protocol Protocol `json:"protocol"`
Parameters map[string]json.RawMessage `json:"parameters"`
Load LoadProfile `json:"load"`
Seed uint64 `json:"seed"`
Status EntryReportStatus `json:"status"`
Conclusion ReportConclusion `json:"conclusion"`
Verification VerificationSummary `json:"verification"`
SLA map[string]MetricValue `json:"sla"`
Metrics map[string]MetricValue `json:"metrics"`
Timeline []json.RawMessage `json:"timeline"`
Distributions []json.RawMessage `json:"distributions"`
CaseResults []Result `json:"case_results"`
}
type EntryReportStatus ¶
type EntryReportStatus string
const ( EntryReportCompleted EntryReportStatus = "completed" EntryReportFailed EntryReportStatus = "failed" EntryReportCancelled EntryReportStatus = "cancelled" EntryReportNotStarted EntryReportStatus = "not_started" )
func (EntryReportStatus) Validate ¶
func (status EntryReportStatus) Validate() error
type EnvironmentSnapshot ¶
type EnvironmentSnapshot struct {
OS string `json:"os"`
Arch string `json:"arch"`
Region string `json:"region"`
NetworkEgress string `json:"network_egress"`
AppVersion string `json:"app_version"`
EngineVersion string `json:"engine_version"`
}
func (EnvironmentSnapshot) Validate ¶
func (environment EnvironmentSnapshot) Validate() error
type Evidence ¶
type ExecutionOrigin ¶
type ExecutionOrigin struct {
Kind string `json:"kind"`
NodeID string `json:"node_id"`
InstallationID string `json:"installation_id"`
EngineBuildID string `json:"engine_build_id"`
RunnerVersion string `json:"runner_version"`
OS string `json:"os"`
Arch string `json:"arch"`
}
ExecutionOrigin is the immutable executor identity recorded at admission. Kind is explicit for both local and remote execution; no missing identity can be interpreted as the current process or a local executor.
func (ExecutionOrigin) Validate ¶
func (origin ExecutionOrigin) Validate() error
type ExecutionStatus ¶
type ExecutionStatus string
ExecutionStatus records transport/workflow completion independently of verification.
const ( ExecutionCompleted ExecutionStatus = "completed" ExecutionFailed ExecutionStatus = "failed" ExecutionCancelled ExecutionStatus = "cancelled" )
func (ExecutionStatus) Validate ¶
func (status ExecutionStatus) Validate() error
type FailureKind ¶
type FailureKind string
const ( FailureNetwork FailureKind = "network" FailureHTTP FailureKind = "http" FailureProtocol FailureKind = "protocol" FailureSemantic FailureKind = "semantic" FailureRateLimit FailureKind = "rate_limit" FailureTimeout FailureKind = "timeout" FailureCancelled FailureKind = "cancelled" FailureSLA FailureKind = "sla" )
func (FailureKind) Validate ¶
func (kind FailureKind) Validate() error
type Integration ¶
type Integration struct {
EntityMeta
Kind IntegrationKind `json:"kind"`
Name string `json:"name"`
CredentialID string `json:"credential_id,omitempty"`
Config IntegrationConfig `json:"config"`
}
func (*Integration) UnmarshalJSON ¶
func (integration *Integration) UnmarshalJSON(data []byte) error
func (Integration) Validate ¶
func (integration Integration) Validate() error
type IntegrationConfig ¶
type IntegrationConfig struct {
BaseURL string `json:"base_url"`
Region string `json:"region,omitempty"`
ExternalID string `json:"external_id,omitempty"`
}
func (IntegrationConfig) Validate ¶
func (config IntegrationConfig) Validate() error
type IntegrationKind ¶
type IntegrationKind string
const IntegrationNewAPI IntegrationKind = "new-api"
func (IntegrationKind) Validate ¶
func (kind IntegrationKind) Validate() error
type LoadProfile ¶
type LoadProfile struct {
Mode LoadMode `json:"mode"`
Concurrency uint32 `json:"concurrency"`
RequestCount uint64 `json:"request_count"`
RatePerSecond float64 `json:"rate_per_second"`
DurationMS uint64 `json:"duration_ms"`
RequestTimeoutMS uint64 `json:"request_timeout_ms"`
}
func (LoadProfile) Validate ¶
func (profile LoadProfile) Validate() error
type MetricValue ¶
type MetricValue struct {
Value float64 `json:"value"`
Unit string `json:"unit"`
Samples int `json:"samples"`
}
func (MetricValue) Validate ¶
func (metric MetricValue) Validate(name string) error
type Model ¶
type Model struct {
EntityMeta
Name string `json:"name"`
Protocols []Protocol `json:"protocols"`
Capabilities []string `json:"capabilities,omitempty"`
}
func (Model) SupportsProtocol ¶
type ModelSnapshot ¶
type ModelSnapshot struct {
EntityRevisionRef
Name string `json:"name"`
Protocol Protocol `json:"protocol"`
Capabilities []string `json:"capabilities"`
}
func (ModelSnapshot) Validate ¶
func (snapshot ModelSnapshot) Validate() error
type PerformancePlanProfile ¶
type PerformancePlanProfile struct {
LoadMode LoadMode `json:"load_mode"`
ArrivalPattern string `json:"arrival_pattern"`
WorkloadMode string `json:"workload_mode"`
RandomInput bool `json:"random_input"`
AffinityEnabled bool `json:"affinity_enabled,omitempty"`
RandomSeed uint32 `json:"random_seed"`
RequestCount uint64 `json:"request_count"`
DurationMS uint64 `json:"duration_ms"`
Concurrency uint32 `json:"concurrency"`
RatePerSecond float64 `json:"rate_per_second"`
MaxInFlight uint32 `json:"max_in_flight"`
TimeoutMS uint64 `json:"timeout_ms"`
InputTokens uint32 `json:"input_tokens"`
OutputTokens uint32 `json:"output_tokens"`
InputTokensStdDev uint32 `json:"input_tokens_stddev"`
OutputTokensStdDev uint32 `json:"output_tokens_stddev"`
WarmupRequests uint64 `json:"warmup_requests"`
RampDurationMS uint64 `json:"ramp_duration_ms"`
RampRequestCap uint64 `json:"ramp_request_cap"`
SliceDurationMS uint64 `json:"slice_duration_ms"`
SLOTTFTMS float64 `json:"slo_ttft_ms"`
SLOTPOTMS float64 `json:"slo_tpot_ms"`
SLOE2EMS float64 `json:"slo_e2e_ms"`
SLOTargetPercent float64 `json:"slo_target_percent"`
CapacityEnabled bool `json:"capacity_enabled"`
CapacityStart float64 `json:"capacity_start"`
CapacityStep float64 `json:"capacity_step"`
}
PerformancePlanProfile is the authored, connection-independent profile for a quick performance plan. Model and channel selection remains a run-time concern so one plan can be compared across bindings.
func (PerformancePlanProfile) LoadProfile ¶
func (profile PerformancePlanProfile) LoadProfile() LoadProfile
LoadProfile provides the common scheduling summary for a performance item.
func (PerformancePlanProfile) Validate ¶
func (profile PerformancePlanProfile) Validate() error
type Plan ¶
type PlanEntry ¶
type PlanEntry struct {
Name string `json:"name,omitempty"`
OnFailure string `json:"on_failure,omitempty"`
Performance *PerformancePlanProfile `json:"performance,omitempty"`
EntryID string `json:"entry_id"`
TargetKind PlanTargetKind `json:"target_kind"`
TargetID string `json:"target_id"`
Parameters map[string]json.RawMessage `json:"parameters"`
WarmupCount uint32 `json:"warmup_count"`
Settings testspec.RunSettings `json:"settings"`
Load LoadProfile `json:"load"`
SLA SLAProfile `json:"sla"`
}
PlanEntry contains one functional target or one performance profile. Repetitions keep their own identity.
type PlanTargetKind ¶
type PlanTargetKind string
const ( PlanTargetCase PlanTargetKind = "case" PlanTargetSuite PlanTargetKind = "suite" PlanTargetPerformance PlanTargetKind = "performance" )
type Protocol ¶
type Protocol string
const ( ProtocolOpenAIChat Protocol = protocol.OpenAIChat ProtocolOpenAIResponses Protocol = protocol.OpenAIResponses ProtocolAnthropicMessages Protocol = protocol.AnthropicMessages ProtocolSeedance Protocol = protocol.Seedance ProtocolWanVideo Protocol = protocol.WanVideo ProtocolMiniMaxVideo Protocol = protocol.MiniMaxVideo )
type ProtocolDefinitions ¶
type ProtocolDefinitions map[Protocol]json.RawMessage
ProtocolDefinitions holds complete native specs for the protocols supported by one Case.
func (ProtocolDefinitions) Clone ¶
func (definitions ProtocolDefinitions) Clone() ProtocolDefinitions
func (ProtocolDefinitions) MarshalJSON ¶
func (definitions ProtocolDefinitions) MarshalJSON() ([]byte, error)
func (*ProtocolDefinitions) UnmarshalJSON ¶
func (definitions *ProtocolDefinitions) UnmarshalJSON(data []byte) error
func (ProtocolDefinitions) Validate ¶
func (definitions ProtocolDefinitions) Validate() error
type ProviderDetail ¶
func (ProviderDetail) Validate ¶
func (detail ProviderDetail) Validate() error
type QuickTaskSnapshot ¶
type QuickTaskSnapshot struct {
SavedChannelID string `json:"saved_channel_id,omitempty"`
CredentialRunID string `json:"credential_run_id,omitempty"`
}
QuickTaskSnapshot records provenance; definitions live in the Run entries.
type Report ¶
type Report struct {
SchemaVersion int `json:"schema_version"`
Protocol Protocol `json:"protocol"`
Verification VerificationSummary `json:"verification"`
ID string `json:"id"`
RunID string `json:"run_id"`
RunStatus RunStatus `json:"run_status"`
GeneratedAt time.Time `json:"generated_at"`
PlanSnapshot RunSnapshot `json:"plan_snapshot"`
Model ReportSubject `json:"model"`
Channel ReportSubject `json:"channel"`
Environment EnvironmentSnapshot `json:"environment"`
ExecutionOrigin *ExecutionOrigin `json:"execution_origin"`
Conclusion ReportConclusion `json:"conclusion"`
SLA map[string]MetricValue `json:"sla"`
Metrics map[string]MetricValue `json:"metrics"`
Timeline []json.RawMessage `json:"timeline"`
Distributions []json.RawMessage `json:"distributions"`
CaseResults []Result `json:"case_results"`
EntryReports []EntryReport `json:"entry_reports"`
ErrorClusters []json.RawMessage `json:"error_clusters"`
Evidence []Evidence `json:"evidence"`
Baseline json.RawMessage `json:"baseline"`
Attachments []ReportAttachment `json:"attachments"`
}
type ReportAttachment ¶
type ReportAttachment struct {
ArtifactID string `json:"artifact_id"`
RunID string `json:"run_id"`
Name string `json:"name"`
RelativePath string `json:"relative_path"`
SHA256 string `json:"sha256"`
MediaType string `json:"media_type"`
Redacted bool `json:"redacted"`
}
func (ReportAttachment) Validate ¶
func (attachment ReportAttachment) Validate(expectedRunID ...string) error
type ReportConclusion ¶
type ReportConclusion struct {
Passed bool `json:"passed"`
Verdict string `json:"verdict"`
Issues []string `json:"issues"`
}
func (ReportConclusion) Validate ¶
func (conclusion ReportConclusion) Validate() error
type ReportSubject ¶
type RequestMethod ¶
type RequestMethod string
const ( RequestGET RequestMethod = "GET" RequestPOST RequestMethod = "POST" RequestPUT RequestMethod = "PUT" RequestPATCH RequestMethod = "PATCH" RequestDELETE RequestMethod = "DELETE" )
func (RequestMethod) Validate ¶
func (method RequestMethod) Validate() error
type Result ¶
type Result struct {
Performance json.RawMessage `json:"performance,omitempty"`
EntityMeta
RunID string `json:"run_id"`
EntryID string `json:"entry_id,omitempty"`
EntryStatus EntryExecutionStatus `json:"entry_status,omitempty"`
CaseID string `json:"case_id,omitempty"`
RequestID string `json:"request_id,omitempty"`
ExecutionStatus ExecutionStatus `json:"execution_status"`
Verification testspec.Verdict `json:"verification"`
Observation *testspec.Observation `json:"observation,omitempty"`
Failure FailureKind `json:"failure_kind,omitempty"`
ErrorCode ErrorCode `json:"error_code,omitempty"`
Detail *ProviderDetail `json:"detail,omitempty"`
Dimensions map[string]string `json:"dimensions,omitempty"`
Metrics map[string]float64 `json:"metrics,omitempty"`
EvidenceIDs []string `json:"evidence_ids,omitempty"`
}
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
func NewRun ¶
func NewRun(meta EntityMeta, planID string, snapshot RunSnapshot) (Run, error)
func (Run) Channel ¶
func (run Run) Channel() ChannelSnapshot
func (Run) Failure ¶
func (run Run) Failure() *RunFailure
func (Run) MarshalJSON ¶
func (Run) Meta ¶
func (run Run) Meta() EntityMeta
func (Run) Snapshot ¶
func (run Run) Snapshot() RunSnapshot
func (*Run) UnmarshalJSON ¶
type RunEntrySnapshot ¶
type RunEntrySnapshot struct {
OnFailure string `json:"on_failure,omitempty"`
Performance *PerformancePlanProfile `json:"performance,omitempty"`
WarmupCount uint32 `json:"warmup_count"`
Settings testspec.RunSettings `json:"settings"`
EntryID string `json:"entry_id"`
TargetKind PlanTargetKind `json:"target_kind"`
TargetID string `json:"target_id"`
Name string `json:"name"`
Key string `json:"key"`
Suite *Suite `json:"suite,omitempty"`
Cases []CaseRevisionRef `json:"cases"`
CaseDefinitions []TestCase `json:"case_definitions"`
Parameters map[string]json.RawMessage `json:"parameters"`
CaseInputs map[string]map[string]json.RawMessage `json:"case_inputs"`
Load LoadProfile `json:"load"`
SLA SLAProfile `json:"sla"`
}
func (RunEntrySnapshot) Validate ¶
func (entry RunEntrySnapshot) Validate(protocol Protocol) error
type RunFailure ¶
func (RunFailure) Validate ¶
func (failure RunFailure) Validate() error
type RunSnapshot ¶
type RunSnapshot struct {
SchemaVersion int `json:"schema_version"`
Plan EntityRevisionRef `json:"plan"`
Model ModelSnapshot `json:"model"`
Channel ChannelSnapshot `json:"channel"`
Environment EnvironmentSnapshot `json:"environment"`
PlanDocument *Plan `json:"plan_document"`
Mapping *ChannelModel `json:"mapping"`
Entries []RunEntrySnapshot `json:"entries"`
QuickTask *QuickTaskSnapshot `json:"quick_task,omitempty"`
}
RunSnapshot freezes the resolved current definitions for every execution mode. Environment describes preparation, not the executor that later accepts it.
func (*RunSnapshot) UnmarshalJSON ¶
func (snapshot *RunSnapshot) UnmarshalJSON(raw []byte) error
func (RunSnapshot) Validate ¶
func (snapshot RunSnapshot) Validate() error
type SLAProfile ¶
func (SLAProfile) Validate ¶
func (profile SLAProfile) Validate() error
type StreamCompletionExpectation ¶
type StreamCompletionExpectation string
const ( StreamCompletionNotApplicable StreamCompletionExpectation = "not_applicable" StreamCompletionRequired StreamCompletionExpectation = "required" StreamCompletionForbidden StreamCompletionExpectation = "forbidden" )
type Suite ¶
type Suite struct {
EntityMeta
Key string `json:"key"`
Name string `json:"name"`
Protocol Protocol `json:"protocol"`
Description string `json:"description"`
Cases []CaseRef `json:"cases"`
Inputs []SuiteInput `json:"inputs"`
}
func (Suite) AcceptsCase ¶
func (Suite) HasFileInputs ¶
func (Suite) ResolveInputs ¶
func (suite Suite) ResolveInputs(values map[string]json.RawMessage) (map[string]json.RawMessage, map[string]map[string]json.RawMessage, error)
ResolveInputs applies Suite defaults and explicit bindings without altering Case definitions.
func (Suite) ValidateCases ¶
ValidateCases resolves membership, protocol and explicit file binding types. Ordinary parameter and supplied-value compatibility are checked by its resolver.
type SuiteInput ¶
type SuiteInput struct {
Key string `json:"key"`
Label string `json:"label"`
testspec.Input
Bindings []SuiteInputBinding `json:"bindings"`
}
SuiteInput explicitly maps one Suite parameter to declared Case input names.
func CloneSuiteInputs ¶
func CloneSuiteInputs(inputs []SuiteInput) []SuiteInput
func (*SuiteInput) UnmarshalJSON ¶
func (input *SuiteInput) UnmarshalJSON(raw []byte) error
UnmarshalJSON keeps the current flat Suite input shape while decoding its embedded Input through the same strict boundary as standalone declarations.
type SuiteInputBinding ¶
type TestAssertion ¶
type TestAssertion struct {
Kind AssertionKind `json:"kind"`
Config json.RawMessage `json:"config"`
}
func (TestAssertion) Validate ¶
func (assertion TestAssertion) Validate() error
type TestCase ¶
type TestCase struct {
EntityMeta
Key string `json:"key"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Dimension string `json:"dimension"`
Enabled bool `json:"enabled"`
Default bool `json:"default"`
Severity CaseSeverity `json:"severity"`
ExecutionMode CaseExecutionMode `json:"execution_mode"`
Definitions ProtocolDefinitions `json:"definitions"`
}
func (TestCase) SupportsProtocol ¶
func (*TestCase) UnmarshalJSON ¶
type TestExpected ¶
type TestExpected struct {
AllowedHTTPStatuses []int `json:"allowed_http_statuses"`
StreamCompletion StreamCompletionExpectation `json:"stream_completion"`
}
func (TestExpected) Validate ¶
func (expected TestExpected) Validate() error
type TestRequest ¶
type TestRequest struct {
Method RequestMethod `json:"method"`
Path string `json:"path"`
Headers map[string]string `json:"headers"`
Body json.RawMessage `json:"body"`
}
func (TestRequest) Validate ¶
func (request TestRequest) Validate() error
type VerificationSummary ¶
type VerificationSummary struct {
Status testspec.VerdictStatus `json:"status"`
Passed uint64 `json:"passed"`
Failed uint64 `json:"failed"`
Observed uint64 `json:"observed"`
Indeterminate uint64 `json:"indeterminate"`
}
func SummarizeVerification ¶
func SummarizeVerification(results []Result) VerificationSummary