model

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cause

type Cause string
const (
	StatusMissmatch Cause = "Status code does not match"
	BodyMissmatch   Cause = "Body does not match"
)

type Group

type Group struct {
	Name  string `json:"name"`
	Tests []Test `json:"tests"`
}

type GroupResult

type GroupResult struct {
	Name            string           `json:"name"`
	Results         []TestResult     `json:"results"`
	SubgroupResults []SubgroupResult `json:"subgroup_results"`
	Total           int              `json:"total"`
	Passed          int              `json:"passed"`
	Failed          int              `json:"failed"`
}

type Regression

type Regression struct {
	Name    string      `json:"name"`
	Groups  []Group     `json:"groups"`
	BaseURL string      `json:"baseURL"`
	Header  http.Header `json:"header,omitempty"`
	Sync    bool        `json:"async,omitempty"`
}

type RegressionResult

type RegressionResult struct {
	Name     string            `json:"name"`
	Metadata map[string]string `json:"metadata"`
	Results  []GroupResult     `json:"results"`
	Total    int               `json:"total"`
	Passed   int               `json:"passed"`
	Failed   int               `json:"failed"`
}

type SubgroupResult

type SubgroupResult struct {
	Name   string `json:"name"`
	Total  int    `json:"total"`
	Passed int    `json:"passed"`
	Failed int    `json:"failed"`
}

type Test

type Test struct {
	Name           string                 `json:"name"`
	Subgroup       string                 `json:"subgroup"`
	Endpoint       string                 `json:"endpoint"`
	Method         string                 `json:"method"`
	Body           map[string]interface{} `json:"body"`
	ExpectedStatus int                    `json:"expectedStatus"`
	ExpectedBody   map[string]interface{} `json:"expectedBody,omitempty"`
	Header         http.Header            `json:"header,omitempty"`
}

type TestResult

type TestResult struct {
	Name     string      `json:"name"`
	Group    string      `json:"-"`
	Subgroup string      `json:"-"`
	Path     string      `json:"path"`
	Pass     bool        `json:"pass"`
	Cause    Cause       `json:"cause,omitempty"`
	Expected interface{} `json:"expected,omitempty"`
	Actual   interface{} `json:"actual,omitempty"`
	Error    string      `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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