Test requests
Technical reference of Solicitudes de prueba.
This API is used in Test requests.
Symbols
| Symbol | Class | Description |
|---|---|---|
| GET | const | GET defines a constant value of the API. |
| POST | const | POST defines a constant value of the API. |
| PUT | const | PUT defines a constant value of the API. |
| PATCH | const | PATCH defines a constant value of the API. |
| DELETE | const | DELETE defines a constant value of the API. |
| HEAD | const | HEAD defines a constant value of the API. |
| OPTIONS | const | OPTIONS defines a constant value of the API. |
| Map | type | Map defines a public type of API. |
| Config | type | Config defines a public type of API. |
| Session | type | Session defines a public type of API. |
| RequestURLParams | type | RequestURLParams defines a public type of API. |
| RequestHeaders | type | RequestHeaders defines a public type of API. |
| RequestCookies | type | RequestCookies defines a public type of API. |
| ActionParams | type | ActionParams defines a public type of API. |
| FormData | type | Build a body multipart/form-data. |
| PipeRequest | type | PipeRequest defines a public type of API. |
| PipeExpected | type | PipeExpected defines a public type of API. |
| NewRequest | type | Build NewRequest. |
| NewActionRequest | type | Build NewActionRequest. |
| ExecutePipeLine | type | Executed ExecutePipeLine. |
| NewResponseExpected | type | Build NewResponseExpected. |
| NewResponseActionExpected | type | Build NewResponseActionExpected. |
GET
Declaration:
GET = "GET" GET defines a constant value of the API.
POST
Declaration:
POST = "POST" POST defines a constant value of the API.
PUT
Declaration:
PUT = "PUT" PUT defines a constant value of the API.
PATCH
Declaration:
PATCH = "PATCH" PATCH defines a constant value of the API.
DELETE
Declaration:
DELETE = "DELETE" DELETE defines a constant value of the API.
HEAD
Declaration:
HEAD = "HEAD" HEAD defines a constant value of the API.
OPTIONS
Declaration:
OPTIONS = "OPTIONS" OPTIONS defines a constant value of the API.
Map
Declaration:
type Map map[string]any Map defines a public type of API.
Config
Declaration:
type Config struct {
Session Session `json:"session,omitempty"`
OverrideConfig func(*server.Config) `json:"-"`
Iterations int `json:"iterations,omitempty"`
Warmup int `json:"warmup,omitempty"`
BenchSampleRate float64 `json:"benchSampleRate,omitempty"`
} Config defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
Session | Sessionjson: "session, omitempty" " | Associated session. |
OverrideConfig | func(*server.Config)json: "-" | Associated configuration. |
Iterations | intjson: "iterations, omitempty" " | Public data associated with Iterations. |
Warmup | intjson: "warmove, omitempty" " | Public data associated with Warmup. |
BenchSampleRate | float64json: "benzSampleRate, omitempty" " | Public data associated with BenchSampleRate. |
Session
Declaration:
type Session map[string]any Session defines a public type of API.
RequestURLParams
Declaration:
type RequestURLParams map[string]string RequestURLParams defines a public type of API.
RequestHeaders
Declaration:
type RequestHeaders map[string]string RequestHeaders defines a public type of API.
RequestCookies
Declaration:
type RequestCookies map[string]string RequestCookies defines a public type of API.
ActionParams
Declaration:
type ActionParams []any ActionParams defines a public type of API.
FormData
Declaration:
type FormData map[string]any Build a body multipart/form-data.
PipeRequest
Declaration:
type PipeRequest interface {
isPipeRequest()
} PipeRequest defines a public type of API.
PipeExpected
Declaration:
type PipeExpected interface {
isPipeExpected()
} PipeExpected defines a public type of API.
NewRequest
Declaration:
type NewRequest struct {
Method string `json:"method"`
URL string `json:"url"`
URLParams RequestURLParams `json:"urlParams,omitempty"`
Headers RequestHeaders `json:"headers,omitempty"`
Cookies RequestCookies `json:"cookies,omitempty"`
Body RequestBodyValue `json:"-"`
} Build NewRequest.
Fields
| Field | Type | Description |
|---|---|---|
Method | stringjson: "method" " | HTTP method or Action name. |
URL | stringjson: "url" " | Structured request URL. |
URLParams | RequestURLParamsjson: "urlParams, omitempty" " | Related URL. |
Headers | RequestHeadersjson: "heads, omitempty" " | Header collection. |
Cookies | RequestCookiesjson: "cookies, omitempty" " | Cookie collection. |
Body | RequestBodyValuejson: "-" | request body. |
NewActionRequest
Declaration:
type NewActionRequest struct {
URL string `json:"url"`
Method string `json:"method"`
Params ActionParams `json:"params,omitempty"`
} Build NewActionRequest.
Fields
| Field | Type | Description |
|---|---|---|
URL | stringjson: "url" " | Structured request URL. |
Method | stringjson: "method" " | HTTP method or Action name. |
Params | ActionParamsjson: "params, omitempty" " | Dynamic parameters of the route. |
ExecutePipeLine
Declaration:
type ExecutePipeLine struct {
Request PipeRequest `json:"-"`
Expected PipeExpected `json:"-"`
} Executed ExecutePipeLine.
Fields
| Field | Type | Description |
|---|---|---|
Request | PipeRequestjson: "-" | request associated with execution. |
Expected | PipeExpectedjson: "-" | Expected type or value. |
NewResponseExpected
Declaration:
type NewResponseExpected struct {
Status int `json:"status,omitempty"`
Headers ExpectedHeadersRule `json:"-"`
Cookies ExpectedCookiesRule `json:"-"`
Body ExpectedBodyRule `json:"-"`
} Build NewResponseExpected.
Fields
| Field | Type | Description |
|---|---|---|
Status | intjson: "status, omitempty" " | Status of the operation. |
Headers | ExpectedHeadersRulejson: "-" | Header collection. |
Cookies | ExpectedCookiesRulejson: "-" | Cookie collection. |
Body | ExpectedBodyRulejson: "-" | request body. |
NewResponseActionExpected
Declaration:
type NewResponseActionExpected struct {
Error ExpectedActionErrorRule `json:"-"`
Result ExpectedActionResultRule `json:"-"`
} Build NewResponseActionExpected.
Fields
| Field | Type | Description |
|---|---|---|
Error | ExpectedActionErrorRulejson: "-" | Associated error. |
Result | ExpectedActionResultRulejson: "-" | Associated outcome. |