Documentation ¶
Overview ¶
Validation invokes language runner for every step in serial fashion with the StepValidateRequest and runner gets back with the StepValidateResponse.
Step Level validation
- Duplicate step implementation
- Step implementation not found : Prints a step implementation stub for every unimplemented step
If there is a validation error it skips that scenario and executes other scenarios in the spec.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var HideSuggestion bool
HideSuggestion is used decide whether suggestion should be given for the unimplemented step or not based on the flag : --hide-suggestion.
var TableRows = ""
TableRows is used to check for table rows range validation.
Functions ¶
Types ¶
type SpecValidationError ¶ added in v0.8.0
type SpecValidationError struct {
// contains filtered or unexported fields
}
func NewSpecValidationError ¶ added in v0.8.0
func NewSpecValidationError(m string, f string) SpecValidationError
NewSpecValidationError generates new spec validation error with error message and filename.
func (SpecValidationError) Error ¶ added in v0.8.0
func (s SpecValidationError) Error() string
Error prints a spec validation error with filename and error message.
type StepValidationError ¶
type StepValidationError struct {
// contains filtered or unexported fields
}
func NewStepValidationError ¶ added in v0.8.0
func NewStepValidationError(s *gauge.Step, m string, f string, e *gm.StepValidateResponse_ErrorType) StepValidationError
NewStepValidationError generates new step validation error with error message, filename and error type.
func (StepValidationError) Error ¶
func (s StepValidationError) Error() string
Error prints a step validation error with filename, line number, error message, step text and suggestion in case of step implementation not found.
func (StepValidationError) Suggestion ¶ added in v0.9.2
func (s StepValidationError) Suggestion() string
type ValidationResult ¶ added in v0.6.2
type ValidationResult struct { SpecCollection *gauge.SpecCollection ErrMap *gauge.BuildErrors Runner runner.Runner Errs []error ParseOk bool }
func NewValidationResult ¶ added in v0.6.2
func NewValidationResult(s *gauge.SpecCollection, errMap *gauge.BuildErrors, r runner.Runner, parseOk bool, e ...error) *ValidationResult
NewValidationResult creates a new Validation result
func ValidateSpecs ¶
func ValidateSpecs(args []string, debug bool) *ValidationResult
ValidateSpecs parses the specs, creates a new validator and call the runner to get the validation result.