Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAvailableTests ¶
func GetAvailableTests() *[]TestDescriptor
GetAvailableTests - return the universe of available tests
func TestHandleFunc ¶
func TestHandleFunc(td TestDescriptor, gd *GoDogTestTuple)
TestHandleFunc - adds the TestHandlerFunc to the handler map, keyed on the TestDescriptor
Types ¶
type Category ¶
type Category int
Category ...
type GoDogTestTuple ¶
type GoDogTestTuple struct { Handler TestHandlerFunc Data *GodogTest }
GoDogTestTuple ...
type GodogTest ¶
type GodogTest struct { TestDescriptor *TestDescriptor TestSuiteInitializer func(*godog.TestSuiteContext) ScenarioInitializer func(*godog.ScenarioContext) FeaturePath *string }
GodogTest ...
type Test ¶
type Test struct { UUID string `json:"uuid,omitempty"` TestDescriptor *TestDescriptor `json:"test_descriptor,omitempty"` Status *TestStatus `json:"status,omitempty"` Results *bytes.Buffer }
Test - structure to hold test data
type TestDescriptor ¶
type TestDescriptor struct { Group Group `json:"group,omitempty"` Category Category `json:"category,omitempty"` Name string `json:"name,omitempty"` }
TestDescriptor - struct to hold description of test, name, category, strictness?? etc.
type TestHandlerFunc ¶
TestHandlerFunc ...
type TestStatus ¶
type TestStatus int
TestStatus ..
const ( Pending TestStatus = iota Running CompleteSuccess CompleteFail Error )
TestStatus enum ...
func (TestStatus) String ¶
func (s TestStatus) String() string
type TestStore ¶
type TestStore struct { Tests map[uuid.UUID]*[]*Test FailedTests map[TestStatus]*[]*Test Lock sync.RWMutex AuditLog *output.AuditLog }
TestStore - holds the current test suite. TODO: still not sure about the structure. Below is: uuid -> pointer to array of pointers to tests this implies that we'd be setting a test run up with multiple "sub" test runs, with each run being identified by a uuid which is mapped to the array of tests I think this could be too complicated, and it's just a simple uuid -> test, i.e. the "test run" is a map of multiple entries, each uuid simply pointing to one test, i.e. uuid -> pointer to test (done ... simples :-) )
func NewTestManager ¶
func NewTestManager() *TestStore
NewTestManager - create a new test manager, backed by TestStore
func (*TestStore) ExecTest ¶
ExecTest by UUID in this case, but could be name, category, etc. Probably need an ExecTests as well ...