Skip to content

testing: API should be general purpose #3343

@gopherbot

Description

@gopherbot

by nickdsnyder:

The testing package currently provides an API that is only useful to gotest, but it
would be nice if the API were made more general so that tests could be easily run from
any Go code.

Specifically, the test runners (RunTests, RunExamples, RunBenchmarks) just write output
to os.Stderr.

An easy improvement would be to add a io.Writer parameter to write output to.

Even better would be to define a test result structure and return a slice of test
results (one per test run).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions