# README
testtools
The package provides some test tools in Golang programming.
- flow: to help you autoload env runners and run test cases.
- envs: the set of any envirments you want up & down when testing.
- Docker-Compose
Usage
func TestDemo(t *testing.T) {
// Initial runner
runner := dockercompose.New("./docker-compose.yml")
// Run testcases
flow.New(runner).
Case("testcase1", func(t *testing.T) {
// TODO
}).
Case("testcase2", func(t *testing.T) {
// TODO
}).
Run(t)
}
Develop your env runner
You just need to implement the Runner interface.
// Runner is to setup the environment required for testing.
type Runner interface {
// Up runner.
Up(tb testing.TB) error
// Down runner.
Down(tb testing.TB) error
}