github.com/slukits/gounit (go): Package gounit is an augmentation of the go testing framework for test driven development.  It comes with a few types to implement test suites and compact assertion to systematically remove noise from tests.  It also comes with a command "gounit" which watches the source directory in which it was executed given it is in the directory structure of a go module.  The gounit command  From the gounit package you will mainly use the types gounit.Suite and gounit.T (gounit.S for Init and Finalize) as well as the function gounit.Run:  If all tests of a suite should run concurrently:  Note that gounit also reports normal go-tests and go-tests with sub-tests.  While on the other hand suite tests are also executed using the "go test" command.  A suit test is a method of a gounit.Suite-embedder which is public, not special, and has exactly one argument (which then must be of type *gounit.T but this is not validated, i.e. gounit will panic if not).  Special methods are Init, SetUp, TearDown and Finalize as well as Get, Set and Del.  The first four methods behave as you expect: Init and Finalize are executed before respectively after all suite-tests.  SetUp and TearDown are executed before respectively after each suite-test.  The other three methods are considered special because they are implemented by the Fixtures utility and it turned out to be a quite natural use case to embedded the Fixtures-type next to the Suite type in a test suite.  Special methods along with compact assertions provided by gounit.T allow you in a systematic way to remove noise from your tests with the goal to make your suite-test implementations the specification of your production API.  While suite tests reported in the order they were written will outline the behavior of your production code and the thought process which led there.  NOTE:  Init and Finalize have not *gounit.T but *gounit.S as argument type. gounit.S wraps the test runner's testing.T instance while gounit.T wraps a test runner's sub-test testing.T instance created to run a particular suite test.  A typical full-blown test suite (in pseudo-code) might look like this:
Keywords: go|golang|tdd