tester_utils

package module
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: 12 Imported by: 0

README ¶

Tester Utils

A protocol-agnostic testing framework for SystemQuest courses.

🚀 Quick Start

New to tester-utils? Start with our Quick Start Guide!

# Install
go get github.com/SystemQuest/tester-utils@v0.7.1

# Read the guide
open docs/QUICK_START.md

📚 Documentation

✨ Features

  • Protocol Agnostic: Supports JSON-RPC 2.0 and REST API
  • Auto-Detection: Automatically detects protocol based on YAML fields
  • Setup/Teardown: Lifecycle hooks for test case preparation and cleanup
  • Advanced Validation: Range, approximation, array, and pattern matching
  • YAML-Driven: Define tests in simple YAML files

📖 Usage

For detailed usage instructions, see Quick Start Guide or check the GoDoc.

Attribution

This project is forked from codecrafters-io/tester-utils and adapted for SystemQuest.

Original work Copyright © CodeCrafters
Modified work Copyright © SystemQuest

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func RunCLI ¶

func RunCLI(env map[string]string, definition tester_definition.TesterDefinition) int

RunCLI executes the tester based on user-provided env vars

func RunHTTPCLI ¶ added in v0.6.0

func RunHTTPCLI(testCases []httpcontext.HTTPTestCase, definition tester_definition.TesterDefinition, isDebug bool) int

RunHTTPCLI is the main entry point for HTTP-based testers This replaces RunCLI() for HTTP-only testing

func RunHTTPCLIWithFilter ¶ added in v0.7.0

func RunHTTPCLIWithFilter(testCases []httpcontext.HTTPTestCase, definition tester_definition.TesterDefinition, isDebug bool, filter *testfilter.TestFilter) int

RunHTTPCLIWithFilter is the main entry point for HTTP-based testers with filtering support This allows selective execution of test cases based on filter criteria

Types ¶

type HTTPTester ¶ added in v0.6.0

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

HTTPTester is a simplified tester for HTTP JSON-RPC 2.0 testing

func NewHTTPTester ¶ added in v0.6.0

func NewHTTPTester(testCases []httpcontext.HTTPTestCase, definition tester_definition.TesterDefinition, isDebug bool) (*HTTPTester, error)

NewHTTPTester creates a new HTTP tester

func (*HTTPTester) Run ¶ added in v0.6.0

func (t *HTTPTester) Run() bool

Run executes all test cases

type Tester ¶

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

Jump to

Keyboard shortcuts

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