Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApplicationTestDefinition ¶ added in v0.0.15
type ApplicationTestDefinition struct { Application applications.Application Scenario applications.Scenario // In addition to the application and scenario, we need an experiment. ExperimentTestDefinition }
ApplicationTestDefinition is used to define tests to run against an application API implementation.
func ReadApplicationTestData ¶ added in v0.0.15
func ReadApplicationTestData(path string) ([]ApplicationTestDefinition, error)
ReadApplicationTestData reads all of the JSON files in the supplied test data directory.
func (*ApplicationTestDefinition) GenerateTemplate ¶ added in v0.0.15
func (td *ApplicationTestDefinition) GenerateTemplate() applications.Template
GenerateTemplate returns details of experiment for this test definition.
type ExperimentTestDefinition ¶ added in v0.0.15
type ExperimentTestDefinition struct { // The name of the experiment to create during the test. ExperimentName experiments.ExperimentName // The experiment definition for testing. Experiment experiments.Experiment // A list of assignments for the baseline trial. May be empty to skip baseline trial tests. Baseline []experiments.Assignment // A matrix of weights used to map a vector of parameter assignments to a vector of metric values. Values [][]float64 // The list of conditions to report as a failure. Failures []struct { // The parameter or metric name (assumes they never conflict). Name string // The optional minimum value to trigger the failure. Min *float64 // The optional maximum value to trigger the failure. Max *float64 // The failure reason to report when the condition is triggered. Reason string // The failure message to report when the condition is triggered. Message string } }
ExperimentTestDefinition is used to define tests to run against an experiments API implementation.
func ReadExperimentsTestData ¶ added in v0.0.15
func ReadExperimentsTestData(path string) ([]ExperimentTestDefinition, error)
ReadExperimentsTestData reads all of the JSON files in the supplied test data directory.
func (*ExperimentTestDefinition) TrialResults ¶ added in v0.0.15
func (d *ExperimentTestDefinition) TrialResults(ta *experiments.TrialAssignments) experiments.TrialValues
TrialResults computes dummy trial results for the supplied assignments.
Click to show internal directories.
Click to hide internal directories.