models

package
v1.21.4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseCheck added in v1.18.0

type DatabaseCheck interface {
	DbQueryString() string
	DbResponseJson() []string

	SetDbQueryString(string)
	SetDbResponseJson([]string)
}

type DatabaseResult added in v1.18.0

type DatabaseResult struct {
	Query    string
	Response []string
}

type Form added in v1.0.7

type Form struct {
	Files map[string]string `json:"files" yaml:"files"`
}

TODO: add support for form fields

type Result

type Result struct {
	Path                string // TODO: remove
	Query               string // TODO: remove
	RequestBody         string
	ResponseStatusCode  int
	ResponseStatus      string
	ResponseContentType string
	ResponseBody        string
	ResponseHeaders     map[string][]string
	Errors              []error
	Test                TestInterface
	DatabaseResult      []DatabaseResult
}

Result of test execution

func (*Result) AllureStatus added in v1.13.0

func (r *Result) AllureStatus() (string, error)

func (*Result) Passed

func (r *Result) Passed() bool

Passed returns true if test passed (false otherwise)

type Summary

type Summary struct {
	Success bool
	Failed  int
	Skipped int
	Broken  int
	Total   int
}

type TestInterface

type TestInterface interface {
	ToQuery() string
	GetRequest() string
	ToJSON() ([]byte, error)
	GetMethod() string
	Path() string
	GetResponses() map[int]string
	GetResponse(code int) (string, bool)
	GetResponseHeaders(code int) (map[string]string, bool)
	GetName() string
	GetDescription() string
	GetStatus() string
	SetStatus(string)
	Fixtures() []string
	ServiceMocks() map[string]interface{}
	Pause() int
	BeforeScriptPath() string
	BeforeScriptTimeout() int
	AfterRequestScriptPath() string
	AfterRequestScriptTimeout() int
	Cookies() map[string]string
	Headers() map[string]string
	ContentType() string
	GetForm() *Form
	DbQueryString() string
	DbResponseJson() []string
	GetVariables() map[string]string
	GetCombinedVariables() map[string]string
	GetVariablesToSet() map[int]map[string]string
	GetDatabaseChecks() []DatabaseCheck
	SetDatabaseChecks([]DatabaseCheck)

	GetFileName() string

	// setters
	SetQuery(string)
	SetMethod(string)
	SetPath(string)
	SetRequest(string)
	SetForm(form *Form)
	SetResponses(map[int]string)
	SetHeaders(map[string]string)
	SetDbQueryString(string)
	SetDbResponseJson([]string)

	// comparison properties
	NeedsCheckingValues() bool
	IgnoreArraysOrdering() bool
	DisallowExtraFields() bool
	IgnoreDbOrdering() bool

	// Clone returns copy of current object
	Clone() TestInterface
}

Common Test interface

Jump to

Keyboard shortcuts

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