httprunner

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToJSON

func ConvertToJSON(v interface{}) string

ConvertToJSON converts any value to JSON for debugging

Types

type HTTPTestRunner

type HTTPTestRunner struct {
	BaseURL string
	Client  *httpclient.Client
	Logger  *logger.Logger
}

HTTPTestRunner runs HTTP JSON-RPC 2.0 tests

func NewHTTPTestRunner

func NewHTTPTestRunner(baseURL string, timeout time.Duration, logger *logger.Logger) *HTTPTestRunner

NewHTTPTestRunner creates a new HTTP test runner

func (*HTTPTestRunner) Clone added in v0.13.0

func (r *HTTPTestRunner) Clone() interface{}

Clone creates an independent copy of the runner for concurrent execution (implements concurrent.TestRunner interface)

func (*HTTPTestRunner) RunSteps added in v0.13.0

func (r *HTTPTestRunner) RunSteps(ctx context.Context, steps []yamlspec.TestStep) error

RunSteps executes multiple test steps sequentially (implements concurrent.TestRunner interface)

func (*HTTPTestRunner) RunTestCase

func (r *HTTPTestRunner) RunTestCase(ctx context.Context, testCase yamlspec.TestCase) error

RunTestCase runs a single test case from YAML spec with setup/teardown support

func (*HTTPTestRunner) RunTestCaseWithHarness

func (r *HTTPTestRunner) RunTestCaseWithHarness(
	harness *test_case_harness.TestCaseHarness,
	testCase yamlspec.TestCase,
) error

RunTestCaseWithHarness runs a test case using TestCaseHarness Returns error if test case fails

Jump to

Keyboard shortcuts

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