testutil

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package testutil provides shared test helpers for saving per-test artifacts to persistent output directories for later LLM review.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArtifactDir

func ArtifactDir(t *testing.T, rootDir string) string

ArtifactDir returns a persistent directory for saving test artifacts:

test/testdata/<run-timestamp>/<TestName>/

The directory is created automatically. Files written here survive after the test finishes, so they can be reviewed by humans or LLMs. rootDir should be the path to the repo root (e.g. "../.." from internal/scaffold).

func RunTimestamp

func RunTimestamp() string

RunTimestamp returns a stable timestamp for the current test run. All tests in the same `go test` invocation share the same timestamp.

func SaveArtifact

func SaveArtifact(t *testing.T, dir, filename string, content []byte)

SaveArtifact writes content to a named file in the test's artifact directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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