fuzzcases

package
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fuzzcases makes bad inputs from a good one: the same body with one thing wrong at a time, in the way property-based API testers do. The order is fixed, so a case that broke a server can be found again.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Case

type Case struct {
	Name string
	Body any
}

Case is a body with one thing wrong, and a name that says what.

func Cases

func Cases(base any, schema map[string]any, limit int) []Case

Cases returns at most limit cases made from base (a decoded JSON body, numbers as json.Number). schema is the body's stored JSON Schema, or nil: it adds a case just past each bound it states. The cases are spread over the fields first, so a small limit still touches every field once before it touches any twice.

Jump to

Keyboard shortcuts

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