Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TestFixture ¶ added in v0.11.0
type TestFixture struct {
Name string `json:"name"`
Input string `json:"input"`
ExpectedStatus string `json:"expected_status"`
ExpectedOutput string `json:"expected_output"`
Timeout string `json:"timeout"`
}
TestFixture is a single test case read from a JSON fixture file.
func LoadFixtures ¶ added in v0.11.0
func LoadFixtures(dir string) ([]TestFixture, error)
LoadFixtures reads all JSON fixture files from a directory.
type TestResult ¶ added in v0.11.0
type TestResult struct {
Fixture TestFixture
Passed bool
Output string
Status string
Duration time.Duration
Error string
}
TestResult holds the outcome of running a single fixture.
type WASMTestRunner ¶ added in v0.11.0
type WASMTestRunner struct {
// contains filtered or unexported fields
}
WASMTestRunner executes WASM tool modules against test fixtures.
func NewWASMTestRunner ¶ added in v0.11.0
func NewWASMTestRunner(modulePath string, fuelBudget uint64, memBudget int64) *WASMTestRunner
NewWASMTestRunner creates a test runner for the given module.
func (*WASMTestRunner) RunAll ¶ added in v0.11.0
func (r *WASMTestRunner) RunAll(ctx context.Context, fixtures []TestFixture) []TestResult
RunAll executes each fixture against the WASM module and returns results.
Click to show internal directories.
Click to hide internal directories.