Documentation ¶
Overview ¶
Execution can be of two types - Simple execution - Paralell execution Execution Flow : - Checks for updates - Validation - Init Registry - Saving Execution result Strategy - Lazy : Lazy is a parallelization strategy for execution. In this case tests assignment will be dynamic during execution, i.e. assign the next spec in line to the stream that has completed it’s previous execution and is waiting for more work. - Eager : Eager is a parallelization strategy for execution. In this case tests are distributed before execution, thus making them an equal number based distribution.
Index ¶
Constants ¶
const ( // Success indicated successful operation Success = 0 // ExecutionFailed indicates gauge's execution failed ExecutionFailed = 1 // ParseFailed indicates one or more parse errors ParseFailed = 2 // ValidationFailed indicates one or more validation errors ValidationFailed = 3 )
const Eager string = "eager"
Eager is a parallelization strategy for execution. In this case tests are distributed before execution, thus making them an equal number based distribution.
const Lazy string = "lazy"
Lazy is a parallelization strategy for execution. In this case tests assignment will be dynamic during execution, i.e. assign the next spec in line to the stream that has completed it’s previous execution and is waiting for more work.
Variables ¶
var ExecuteSpecs = func(specDirs []string) int { err := validateFlags() if err != nil { logger.Fatalf(true, err.Error()) } if config.CheckUpdates() { i := &install.UpdateFacade{} i.BufferUpdateDetails() defer i.PrintUpdateBuffer() } skel.SetupPlugins(MachineReadable) res := validation.ValidateSpecs(specDirs, false) if len(res.Errs) > 0 { if res.ParseOk { return ParseFailed } return ValidationFailed } if res.SpecCollection.Size() < 1 { logger.Infof(true, "No specifications found in %s.", strings.Join(specDirs, ", ")) res.Runner.Kill() if res.ParseOk { return Success } return ExecutionFailed } event.InitRegistry() wg := &sync.WaitGroup{} reporter.ListenExecutionEvents(wg) rerun.ListenFailedScenarios(wg, specDirs) if util.ConvertToBool(os.Getenv(env.SaveExecutionResult), env.SaveExecutionResult, false) { ListenSuiteEndAndSaveResult(wg) } defer wg.Wait() ei := newExecutionInfo(res.SpecCollection, res.Runner, nil, res.ErrMap, InParallel, 0) e := newExecution(ei) return printExecutionStatus(e.run(), res.ParseOk) }
ExecuteSpecs : Check for updates, validates the specs (by invoking the respective language runners), initiates the registry which is needed for console reporting, execution API and Rerunning of specs and finally saves the execution result as binary in .gauge folder.
var ExecuteTags = ""
var InParallel bool
InParallel if true executes the specs in parallel else in serial.
var MachineReadable bool
MachineReadable indicates that the output is in json format
var NumberOfExecutionStreams int
NumberOfExecutionStreams shows the number of execution streams, in parallel execution.
var Strategy string
Functions ¶
func ListenSuiteEndAndSaveResult ¶ added in v0.8.5
ListenSuiteEndAndSaveResult listens to execution events and writes the failed scenarios to JSON file
func ReadExecutionStatus ¶ added in v0.9.8
func ReadExecutionStatus() (interface{}, error)
func SetTableRows ¶ added in v0.8.4
func SetTableRows(tableRows string)
Types ¶
This section is empty.