Documentation ¶
Overview ¶
Package execution handles the execution of cases and sequences.
This includes showing the templates for the different parts of the execution (start page, step page, summary page), saving the results of a step and the protocol of the completed execution.
Index ¶
- func CaseExecutionPost(protocolLister test.ProtocolLister, caseProtocolStore CaseProtocolStore, ...) http.HandlerFunc
- func CaseStartPageGet() http.HandlerFunc
- func GetCurrentSequenceProtocol(r *http.Request) (*test.SequenceExecutionProtocol, error)
- func SequenceExecutionPost(caseProtocolLister test.ProtocolLister, caseProtocolStore CaseProtocolStore, ...) http.HandlerFunc
- func SequenceStartPageGet(caseGetter CaseProtocolGetter) http.HandlerFunc
- type CaseProtocolAdder
- type CaseProtocolGetter
- type CaseProtocolStore
- type SequenceProtocolAdder
- type SequenceProtocolStore
- type TimeSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaseExecutionPost ¶
func CaseExecutionPost(protocolLister test.ProtocolLister, caseProtocolStore CaseProtocolStore, sequenceProtocolAdder SequenceProtocolAdder, progress progressMeter, testSequenceVersion *test.SequenceVersion, testCaseGetter handler.TestCaseGetter) http.HandlerFunc
CaseExecutionPost handles all post requests during a testcase execution. It is a meta handler that further calls it's sub handlers.
func CaseStartPageGet ¶
func CaseStartPageGet() http.HandlerFunc
CaseStartPageGet serves the start page for testcase executions.
func GetCurrentSequenceProtocol ¶ added in v1.5.0
func GetCurrentSequenceProtocol(r *http.Request) (*test.SequenceExecutionProtocol, error)
GetCurrentSequenceProtocol returns the protocol to the currently running sequence execution to the given request. If there is no sequence execution running, the function will return nil, nil If an error occurs nil and the error will be returned
func SequenceExecutionPost ¶
func SequenceExecutionPost(caseProtocolLister test.ProtocolLister, caseProtocolStore CaseProtocolStore, sequenceProtocolAdder SequenceProtocolAdder, tcg handler.TestCaseGetter, tsg middleware.TestSequenceStore) http.HandlerFunc
SequenceExecutionPost returns a handler capable of handling every request during the execution of a sequence.
func SequenceStartPageGet ¶ added in v1.5.0
func SequenceStartPageGet(caseGetter CaseProtocolGetter) http.HandlerFunc
SequenceStartPageGet serves the start page for a testsequence execution.
Types ¶
type CaseProtocolAdder ¶
type CaseProtocolAdder interface { // AddCaseProtocol adds the given protocol to the store AddCaseProtocol(r *test.CaseExecutionProtocol, testCaseVersion test.CaseVersion) (err error) }
CaseProtocolAdder is used to add new testcase protocols to the store.
type CaseProtocolGetter ¶
type CaseProtocolGetter interface { // GetCaseExecutionProtocol gets the protocol with the given id for the testcase with given id, // which is part of the project with given id. GetCaseExecutionProtocol(protocolID id.ProtocolID) (test.CaseExecutionProtocol, error) }
CaseProtocolGetter is used to get testcase protocols from the store.
type CaseProtocolStore ¶
type CaseProtocolStore interface { CaseProtocolAdder CaseProtocolGetter // GetCaseExecutionProtocols gets the protocols for the testcase with given id, // which is part of the project with given id. GetCaseExecutionProtocols(testCaseID id.TestID) ([]test.CaseExecutionProtocol, error) }
CaseProtocolStore interface for storing testcase protocols.
type SequenceProtocolAdder ¶
type SequenceProtocolAdder interface { // AddSequenceProtocol adds the given protocol to the store AddSequenceProtocol(r *test.SequenceExecutionProtocol, sequenceVersion test.SequenceVersion) (err error) }
SequenceProtocolAdder interface for storing testsequence protocols.
type SequenceProtocolStore ¶
type SequenceProtocolStore interface { SequenceProtocolAdder // GetSequenceExecutionProtocols gets the protocols for the testsequence with given id, // which is part of the project with given id. GetSequenceExecutionProtocols(projectID, sequenceID string) ([]test.SequenceExecutionProtocol, error) // GetSequenceExecutionProtocol gets the protocol with the given id for the testsequence with given id, // which is part of the project with given id. GetSequenceExecutionProtocol(projectID, sequenceID string, protocolID int) (test.SequenceExecutionProtocol, error) }
SequenceProtocolStore interface for storing testsequence protocols.
type TimeSession ¶
type TimeSession interface { //GetDuration returns the duration needed in this execution til now. //If there is no sequence execution running, the function will return nil, nil //If an error occurs nil and the error will be returned GetDuration(r *http.Request) (*duration.Duration, error) //SetDuration saves the given duration to the session. //After this call, you can get the current duration via the GetDuration-function SetDuration(w http.ResponseWriter, r *http.Request, duration *duration.Duration) error }
TimeSession is used to store time in during requests.