venom: Index | Files

package http

import ""


Package Files



const Name = "http"

Name of executor

func New Uses

func New() venom.Executor

New returns a new Executor

type Executor Uses

type Executor struct {
    Method            string      `json:"method" yaml:"method"`
    URL               string      `json:"url" yaml:"url"`
    Path              string      `json:"path" yaml:"path"`
    Body              string      `json:"body" yaml:"body"`
    BodyFile          string      `json:"bodyfile" yaml:"bodyfile"`
    MultipartForm     interface{} `json:"multipart_form" yaml:"multipart_form"`
    Headers           Headers     `json:"headers" yaml:"headers"`
    IgnoreVerifySSL   bool        `json:"ignore_verify_ssl" yaml:"ignore_verify_ssl" mapstructure:"ignore_verify_ssl"`
    BasicAuthUser     string      `json:"basic_auth_user" yaml:"basic_auth_user" mapstructure:"basic_auth_user"`
    BasicAuthPassword string      `json:"basic_auth_password" yaml:"basic_auth_password" mapstructure:"basic_auth_password"`
    SkipHeaders       bool        `json:"skip_headers" yaml:"skip_headers" mapstructure:"skip_headers"`
    SkipBody          bool        `json:"skip_body" yaml:"skip_body" mapstructure:"skip_body"`
    Proxy             string      `json:"proxy" yaml:"proxy" mapstructure:"proxy"`
    NoFollowRedirect  bool        `json:"no_follow_redirect" yaml:"no_follow_redirect" mapstructure:"no_follow_redirect"`
    UnixSock          string      `json:"unix_sock" yaml:"unix_sock" mapstructure:"unix_sock"`

Executor struct. Json and yaml descriptor are used for json output

func (Executor) GetDefaultAssertions Uses

func (Executor) GetDefaultAssertions() venom.StepAssertions

GetDefaultAssertions return default assertions for this executor Optional

func (Executor) Run Uses

func (Executor) Run(testCaseContext venom.TestCaseContext, l venom.Logger, step venom.TestStep, workdir string) (venom.ExecutorResult, error)

Run execute TestStep

func (Executor) ZeroValueResult Uses

func (Executor) ZeroValueResult() venom.ExecutorResult

ZeroValueResult return an empty implemtation of this executor result

type Headers Uses

type Headers map[string]string

Headers represents header HTTP for Request

type Result Uses

type Result struct {
    Executor    Executor    `json:"executor,omitempty" yaml:"executor,omitempty"`
    TimeSeconds float64     `json:"timeseconds,omitempty" yaml:"timeseconds,omitempty"`
    TimeHuman   string      `json:"timehuman,omitempty" yaml:"timehuman,omitempty"`
    StatusCode  int         `json:"statuscode,omitempty" yaml:"statuscode,omitempty"`
    Body        string      `json:"body,omitempty" yaml:"body,omitempty"`
    BodyJSON    interface{} `json:"bodyjson,omitempty" yaml:"bodyjson,omitempty"`
    Headers     Headers     `json:"headers,omitempty" yaml:"headers,omitempty"`
    Err         string      `json:"err,omitempty" yaml:"err,omitempty"`

Result represents a step result. Json and yaml descriptor are used for json output

Package http imports 18 packages (graph) and is imported by 6 packages. Updated 2020-08-12. Refresh now. Tools for package owners.