service

package
v0.0.0-...-ead56d2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefs

func GetDefs(fsys fs.FS, config *entity.Configuration, logger *log.Logger) ([]fs.File, error)

GetDefs searches desired test directory for test definition

func ParseData

func ParseData(
	files []fs.File,
	cfg *entity.Configuration,
	logger *log.Logger,
) ([]*entity.TestData, error)

ParseData read and parse structured test data from current working directory

func WriteTestLog

func WriteTestLog(
	result *entity.TestLog,
	fsys fs.FS,
	config *entity.Configuration,
) error

WriteTestLog writes test result in case of test fails

Types

type Fetcher

type Fetcher struct {
	// contains filtered or unexported fields
}

Fetcher constructs the request

func NewFetcher

func NewFetcher(ep entity.Endpoint) *Fetcher

NewFetcher creates a new fetcher that can be used to do request calls

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(parse bool) (*entity.FetchResult, error)

Fetch constructs request, send the request, and return a response string from it

type TestRunner

type TestRunner struct {
	// contains filtered or unexported fields
}

TestRunner runs and executes test concurrently

func NewTestRunner

func NewTestRunner(
	data *entity.TestData,
	config *entity.Configuration,
) *TestRunner

NewTestRunner creates a new test runner that executes test concurrently

func (*TestRunner) RunTest

func (r *TestRunner) RunTest(
	wg *sync.WaitGroup,
	ch chan<- *entity.RunnerResult,
)

RunTest executes the test and returns the test result

Jump to

Keyboard shortcuts

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