treqs

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, ctx context.Context, reqs []rq.Request, options ...Option)

Run runs all requests provided as argumentss. Each request is executed in a subtest with the name of the request and each assertion result is marked as a pass or fail in the test output. The requests are executed using the provided context. Environment variables or a shared runtime can be provided via the context.

func RunDir

func RunDir(t *testing.T, ctx context.Context, path string, options ...Option)

RunDir runs all requests from all files with a .http extension found recursively in the directory designated in the path.

func RunFile

func RunFile(t *testing.T, ctx context.Context, path string, options ...Option)

RunFile runs all requests in a file. Each requests is run in a subtest with the name of the request and each assertion result is marked as a pass or fail in the test output.

func WithVerboseLogging

func WithVerboseLogging(opts *Options)

Types

type Option

type Option func(*Options)

type Options

type Options struct {
	Verbose bool
}

Jump to

Keyboard shortcuts

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