yaml

package
v0.0.0-...-b7db0ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2017 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldMatchYaml

func ShouldMatchYaml(actual interface{}, expected ...interface{}) string

Types

type Action

type Action map[string]interface{}

Action ...

type ActionContext

type ActionContext map[string]interface{}

ActionContext ...

type ContextBuilder

type ContextBuilder struct {
	// contains filtered or unexported fields
}

ContextBuilder ...

func (ContextBuilder) Build

func (instance ContextBuilder) Build() core.ExecutionContext

Build ...

func (ContextBuilder) Set

func (instance ContextBuilder) Set(key string, value interface{}) ContextBuilder

Set ...

func (ContextBuilder) SetDefault

func (instance ContextBuilder) SetDefault(actionType string, key string, value interface{}) ContextBuilder

SetDefaults ...

func (ContextBuilder) SetList

func (instance ContextBuilder) SetList(key string, value []core.ExecutionContext) ContextBuilder

SetList ...

type DummyActionBuilder

type DummyActionBuilder struct {
	// contains filtered or unexported fields
}

DummyActionBuilder ...

func (DummyActionBuilder) Build

func (instance DummyActionBuilder) Build() map[string]interface{}

Build ...

func (DummyActionBuilder) LogToFile

func (instance DummyActionBuilder) LogToFile(path string) DummyActionBuilder

LogToFile ...

func (DummyActionBuilder) Set

func (instance DummyActionBuilder) Set(key string, value interface{}) DummyActionBuilder

Set ...

type EmptyAssertionParser

type EmptyAssertionParser struct{}

EmptyAssertionParser ...

func (EmptyAssertionParser) Key

func (instance EmptyAssertionParser) Key() string

Key ...

func (EmptyAssertionParser) Parse

func (instance EmptyAssertionParser) Parse(input map[string]interface{}) (core.Assertion, error)

Parse ...

type ExactAssertionParser

type ExactAssertionParser struct{}

ExactAssertionParser ...

func (ExactAssertionParser) Key

func (instance ExactAssertionParser) Key() string

Key ...

func (ExactAssertionParser) Parse

func (instance ExactAssertionParser) Parse(input map[string]interface{}) (core.Assertion, error)

Parse ...

type ExecutionJob

type ExecutionJob struct {
	Name    string                 `json:"name,omitempty"`
	Before  []Action               `json:"before,omitempty"`
	Steps   []ExecutionStep        `json:"steps,omitempty"`
	Context map[string]interface{} `json:"context,omitempty"`
	After   []Action               `json:"after,omitempty"`
}

ExecutionJob ...

type ExecutionPlan

type ExecutionPlan struct {
	Iterations int                    `json:"iterations,omitempty"`
	Random     bool                   `json:"random"`
	Workers    int                    `json:"workers,omitempty"`
	WaitTime   string                 `json:"waitTime,omitempty"`
	Duration   string                 `json:"duration,omitempty"`
	Name       string                 `json:"name,omitempty"`
	Context    map[string]interface{} `json:"context,omitempty"`
	Before     []Action               `json:"before,omitempty"`
	Jobs       []ExecutionJob         `json:"jobs,omitempty"`
	After      []Action               `json:"after,omitempty"`
}

ExecutionPlan ...

type ExecutionPlanParser

type ExecutionPlanParser struct {
	ExecutionActionParsers    map[string]core.ExecutionActionParser
	ExecutionAssertionParsers map[string]core.ExecutionAssertionParser
	ExecutionExtractorParsers map[string]core.ExecutionExtractorParser
}

ExecutionPlanParser ...

func CreateExecutionPlanParser

func CreateExecutionPlanParser(registry core.Registry) *ExecutionPlanParser

CreateExecutionPlanParser ...

func (*ExecutionPlanParser) AddActionParser

func (instance *ExecutionPlanParser) AddActionParser(actionType string, parser core.ExecutionActionParser)

AddActionParser ...

func (*ExecutionPlanParser) AddAssertionParser

func (instance *ExecutionPlanParser) AddAssertionParser(assertionType string, parser core.ExecutionAssertionParser)

AddAssertionParser ...

func (*ExecutionPlanParser) AddExtractorParser

func (instance *ExecutionPlanParser) AddExtractorParser(assertionType string, parser core.ExecutionExtractorParser)

AddExtractorParser ...

func (*ExecutionPlanParser) Parse

func (instance *ExecutionPlanParser) Parse(data string) (core.Plan, error)

Parse ...

type ExecutionStep

type ExecutionStep struct {
	Name       string                   `json:"name,omitempty"`
	Before     []Action                 `json:"before,omitempty"`
	Action     Action                   `json:"action,omitempty"`
	Extractors []map[string]interface{} `json:"extractors,omitempty"`
	Assertions []map[string]interface{} `json:"assertions,omitempty"`
	After      []Action                 `json:"after,omitempty"`
}

ExecutionStep ...

type GreaterThanAssertionParser

type GreaterThanAssertionParser struct{}

GreaterThanAssertionParser ...

func (GreaterThanAssertionParser) Key

func (instance GreaterThanAssertionParser) Key() string

Key ...

func (GreaterThanAssertionParser) Parse

func (instance GreaterThanAssertionParser) Parse(input map[string]interface{}) (core.Assertion, error)

Parse ...

type GreaterThanOrEqualAssertionParser

type GreaterThanOrEqualAssertionParser struct{}

GreaterThanOrEqualAssertionParser ...

func (GreaterThanOrEqualAssertionParser) Key

Key ...

func (GreaterThanOrEqualAssertionParser) Parse

func (instance GreaterThanOrEqualAssertionParser) Parse(input map[string]interface{}) (core.Assertion, error)

Parse ...

type IPanicActionBuilder

type IPanicActionBuilder struct {
	// contains filtered or unexported fields
}

IPanicActionBuilder ...

func (IPanicActionBuilder) Build

func (instance IPanicActionBuilder) Build() map[string]interface{}

Build ...

type JSONPathExtractorBuilder

type JSONPathExtractorBuilder struct {
	// contains filtered or unexported fields
}

JSONPathExtractorBuilder ...

func (JSONPathExtractorBuilder) Build

func (instance JSONPathExtractorBuilder) Build() map[string]interface{}

Build ...

func (JSONPathExtractorBuilder) JSONPath

func (instance JSONPathExtractorBuilder) JSONPath(value string) JSONPathExtractorBuilder

JSONPath ...

func (JSONPathExtractorBuilder) Key

Key ...

func (JSONPathExtractorBuilder) Name

Name ...

func (JSONPathExtractorBuilder) Scope

Scope ...

type JSONPathExtractorParser

type JSONPathExtractorParser struct{}

JSONPathExtractorParser ...

func (JSONPathExtractorParser) Key

func (instance JSONPathExtractorParser) Key() string

Key ...

func (JSONPathExtractorParser) Parse

func (instance JSONPathExtractorParser) Parse(input map[string]interface{}) (core.Extractor, error)

Parse ...

type JobBuilder

type JobBuilder struct {
	Name         string
	StepBuilders []*StepBuilder
	Context      map[string]interface{}
	Before       []Action
	After        []Action
}

JobBuilder ...

func NewJobBuilder

func NewJobBuilder(name string) *JobBuilder

NewJobBuilder ...

func (*JobBuilder) AddAfter

func (instance *JobBuilder) AddAfter(after Action) *JobBuilder

AddAfter ...

func (*JobBuilder) AddBefore

func (instance *JobBuilder) AddBefore(before Action) *JobBuilder

AddBefore ...

func (*JobBuilder) Build

func (instance *JobBuilder) Build() ExecutionJob

Build ...

func (*JobBuilder) CreateStep

func (instance *JobBuilder) CreateStep() *StepBuilder

CreateStep ...

func (*JobBuilder) CurrentStepBuilder

func (instance *JobBuilder) CurrentStepBuilder() *StepBuilder

CurrentStepBuilder ...

func (*JobBuilder) WithContext

func (instance *JobBuilder) WithContext(context map[string]interface{}) *JobBuilder

WithContext ...

func (*JobBuilder) WithName

func (instance *JobBuilder) WithName(name string) *JobBuilder

WithName ...

type KeyValueExtractorParser

type KeyValueExtractorParser struct{}

KeyValueExtractorParser ...

func (KeyValueExtractorParser) Key

func (instance KeyValueExtractorParser) Key() string

Key ...

func (KeyValueExtractorParser) Parse

func (instance KeyValueExtractorParser) Parse(input map[string]interface{}) (core.Extractor, error)

Parse ...

type LessThanAssertionParser

type LessThanAssertionParser struct{}

LessThanAssertionParser ...

func (LessThanAssertionParser) Key

func (instance LessThanAssertionParser) Key() string

Key ...

func (LessThanAssertionParser) Parse

func (instance LessThanAssertionParser) Parse(input map[string]interface{}) (core.Assertion, error)

Parse ...

type LessThanOrEqualAssertionParser

type LessThanOrEqualAssertionParser struct{}

LessThanOrEqualAssertionParser ...

func (LessThanOrEqualAssertionParser) Key

func (instance LessThanOrEqualAssertionParser) Key() string

Key ...

func (LessThanOrEqualAssertionParser) Parse

func (instance LessThanOrEqualAssertionParser) Parse(input map[string]interface{}) (core.Assertion, error)

Parse ...

type NotEmptyAssertionParser

type NotEmptyAssertionParser struct{}

NotEmptyAssertionParser ...

func (NotEmptyAssertionParser) Key

func (instance NotEmptyAssertionParser) Key() string

Key ...

func (NotEmptyAssertionParser) Parse

func (instance NotEmptyAssertionParser) Parse(input map[string]interface{}) (core.Assertion, error)

Parse ...

type NotEqualAssertionParser

type NotEqualAssertionParser struct{}

NotEqualAssertionParser ...

func (NotEqualAssertionParser) Key

func (instance NotEqualAssertionParser) Key() string

Key ...

func (NotEqualAssertionParser) Parse

func (instance NotEqualAssertionParser) Parse(input map[string]interface{}) (core.Assertion, error)

Parse ...

type PlanBuilder

type PlanBuilder struct {
	Name            string
	Iterations      int
	Random          bool
	NumberOfWorkers int
	WaitTime        string
	Duration        string
	JobBuilders     []*JobBuilder
	Context         core.ExecutionContext
	Before          []Action
	After           []Action
}

PlanBuilder ...

func NewPlanBuilder

func NewPlanBuilder() *PlanBuilder

NewPlanBuilder ...

func (*PlanBuilder) AddAfter

func (instance *PlanBuilder) AddAfter(after Action) *PlanBuilder

AddAfter ...

func (*PlanBuilder) AddBefore

func (instance *PlanBuilder) AddBefore(before Action) *PlanBuilder

AddBefore ...

func (*PlanBuilder) Build

func (instance *PlanBuilder) Build() ExecutionPlan

Build ...

func (*PlanBuilder) BuildAndSave

func (instance *PlanBuilder) BuildAndSave() (*os.File, error)

BuildAndSave ... TODO deprecate this

func (PlanBuilder) BuildContext

func (instance PlanBuilder) BuildContext() ContextBuilder

BuildContext ...

func (*PlanBuilder) CreateJob

func (instance *PlanBuilder) CreateJob(arg ...string) *JobBuilder

CreateJob ...

func (PlanBuilder) DummyAction

func (instance PlanBuilder) DummyAction() DummyActionBuilder

DummyAction ...

func (PlanBuilder) EmptyAssertion

func (instance PlanBuilder) EmptyAssertion(key string) map[string]interface{}

EmptyAssertion ...

func (PlanBuilder) ExactAssertion

func (instance PlanBuilder) ExactAssertion(key string, expected interface{}) map[string]interface{}

ExactAssertion ...

func (PlanBuilder) GreaterThanAssertion

func (instance PlanBuilder) GreaterThanAssertion(key string, expected interface{}) map[string]interface{}

GreaterThanAssertion ...

func (PlanBuilder) GreaterThanOrEqualAssertion

func (instance PlanBuilder) GreaterThanOrEqualAssertion(key string, expected interface{}) map[string]interface{}

GreaterThanOrEqualAssertion ...

func (PlanBuilder) HTTPAction

func (instance PlanBuilder) HTTPAction() RequestBuilder

HTTPAction ...

func (PlanBuilder) IPanicAction

func (instance PlanBuilder) IPanicAction() IPanicActionBuilder

IPanicAction ...

func (PlanBuilder) JSONPathExtractor

func (instance PlanBuilder) JSONPathExtractor() JSONPathExtractorBuilder

JSONPathExtractor ...

func (PlanBuilder) LessThanAssertion

func (instance PlanBuilder) LessThanAssertion(key string, expected interface{}) map[string]interface{}

LessThanAssertion ...

func (PlanBuilder) LessThanOrEqualAssertion

func (instance PlanBuilder) LessThanOrEqualAssertion(key string, expected interface{}) map[string]interface{}

LessThanOrEqualAssertion ...

func (PlanBuilder) NotEmptyAssertion

func (instance PlanBuilder) NotEmptyAssertion(key string) map[string]interface{}

NotEmptyAssertion ...

func (PlanBuilder) NotEqualAssertion

func (instance PlanBuilder) NotEqualAssertion(key string, expected interface{}) map[string]interface{}

NotEqualAssertion ...

func (PlanBuilder) RegexExtractor

func (instance PlanBuilder) RegexExtractor() RegexExtractorBuilder

RegexExtractor ...

func (*PlanBuilder) SetDuration

func (instance *PlanBuilder) SetDuration(value string) *PlanBuilder

SetDuration ...

func (*PlanBuilder) SetIterations

func (instance *PlanBuilder) SetIterations(value int) *PlanBuilder

SetIterations ...

func (*PlanBuilder) SetRandom

func (instance *PlanBuilder) SetRandom(value bool) *PlanBuilder

SetRandom ...

func (*PlanBuilder) SetWaitTime

func (instance *PlanBuilder) SetWaitTime(value string) *PlanBuilder

SetWaitTime ...

func (*PlanBuilder) SetWorkers

func (instance *PlanBuilder) SetWorkers(value int) *PlanBuilder

SetWorkers ...

func (*PlanBuilder) WithContext

func (instance *PlanBuilder) WithContext(context core.ExecutionContext) *PlanBuilder

WithContext ...

func (*PlanBuilder) WithName

func (instance *PlanBuilder) WithName(name string) *PlanBuilder

WithName ...

func (PlanBuilder) XPathExtractor

func (instance PlanBuilder) XPathExtractor() XPathExtractorBuilder

XPathExtractor ...

type RegexExtractorBuilder

type RegexExtractorBuilder struct {
	// contains filtered or unexported fields
}

RegexExtractorBuilder ...

func (RegexExtractorBuilder) Build

func (instance RegexExtractorBuilder) Build() map[string]interface{}

Build ...

func (RegexExtractorBuilder) Key

Key ...

func (RegexExtractorBuilder) Match

func (instance RegexExtractorBuilder) Match(value string) RegexExtractorBuilder

Match ...

func (RegexExtractorBuilder) Name

func (instance RegexExtractorBuilder) Name(value string) RegexExtractorBuilder

Name ...

func (RegexExtractorBuilder) Scope

func (instance RegexExtractorBuilder) Scope(value string) RegexExtractorBuilder

Scope ...

type RegexExtractorParser

type RegexExtractorParser struct{}

RegexExtractorParser ...

func (RegexExtractorParser) Key

func (instance RegexExtractorParser) Key() string

Key ...

func (RegexExtractorParser) Parse

func (instance RegexExtractorParser) Parse(input map[string]interface{}) (core.Extractor, error)

Parse ...

type RequestBuilder

type RequestBuilder struct {
	// contains filtered or unexported fields
}

RequestBuilder ...

func NewHTTPRequestBuilder

func NewHTTPRequestBuilder() RequestBuilder

NewHTTPRequestBuilder ...

func (RequestBuilder) Body

func (instance RequestBuilder) Body(value string) RequestBuilder

Body ...

func (RequestBuilder) Build

func (instance RequestBuilder) Build() map[string]interface{}

Build ...

func (RequestBuilder) Header

func (instance RequestBuilder) Header(key string, value string) RequestBuilder

Header ...

func (RequestBuilder) Method

func (instance RequestBuilder) Method(value string) RequestBuilder

Method ...

func (RequestBuilder) Timeout

func (instance RequestBuilder) Timeout(value int) RequestBuilder

Timeout ...

func (RequestBuilder) URL

func (instance RequestBuilder) URL(value string) RequestBuilder

URL ...

type StepBuilder

type StepBuilder struct {
	Name       string
	Before     []Action
	Action     map[string]interface{}
	Assertions []map[string]interface{}
	Extractors []map[string]interface{}
	After      []Action
}

StepBuilder ...

func NewStepBuilder

func NewStepBuilder() *StepBuilder

NewStepBuilder ...

func (*StepBuilder) AddAfter

func (instance *StepBuilder) AddAfter(after Action) *StepBuilder

AddAfter ...

func (*StepBuilder) AddBefore

func (instance *StepBuilder) AddBefore(before Action) *StepBuilder

AddBefore ...

func (*StepBuilder) Build

func (instance *StepBuilder) Build() ExecutionStep

Build ...

func (*StepBuilder) ToExecuteAction

func (instance *StepBuilder) ToExecuteAction(data Action) *StepBuilder

ToExecuteAction ...

func (*StepBuilder) WithAssertion

func (instance *StepBuilder) WithAssertion(data map[string]interface{}) *StepBuilder

WithAssertion ...

func (*StepBuilder) WithExtractor

func (instance *StepBuilder) WithExtractor(data map[string]interface{}) *StepBuilder

WithExtractor ...

func (*StepBuilder) WithName

func (instance *StepBuilder) WithName(name string) *StepBuilder

WithName ...

type XPathExtractorBuilder

type XPathExtractorBuilder struct {
	// contains filtered or unexported fields
}

XPathExtractorBuilder ...

func (XPathExtractorBuilder) Build

func (instance XPathExtractorBuilder) Build() map[string]interface{}

Build ...

func (XPathExtractorBuilder) Key

Key ...

func (XPathExtractorBuilder) Name

func (instance XPathExtractorBuilder) Name(value string) XPathExtractorBuilder

Name ...

func (XPathExtractorBuilder) Scope

func (instance XPathExtractorBuilder) Scope(value string) XPathExtractorBuilder

Scope ...

func (XPathExtractorBuilder) XPath

func (instance XPathExtractorBuilder) XPath(value string) XPathExtractorBuilder

XPath ...

type XPathExtractorParser

type XPathExtractorParser struct{}

XPathExtractorParser ...

func (XPathExtractorParser) Key

func (instance XPathExtractorParser) Key() string

Key ...

func (XPathExtractorParser) Parse

func (instance XPathExtractorParser) Parse(input map[string]interface{}) (core.Extractor, error)

Parse ...

type YAMLSummaryBuilder

type YAMLSummaryBuilder struct {
	Writer io.Writer
}

YAMLSummaryBuilder ...

func (*YAMLSummaryBuilder) Write

func (this *YAMLSummaryBuilder) Write(summary core.ExecutionSummary)

Write ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL