top

PrettyTest is a simple testing library for golang. It aims to simplify/prettify testing in golang.

It features:

* a simple assertion vocabulary for better readability

* customizable formatters through interfaces

* before/after functions

* integrated with the go test command

* pretty and colorful output with reports

This is the skeleton of a typical prettytest test file:

    package foo

    import (
	"testing"
	"github.com/aarondl/prettytest"
    )

    // Start of setup
    type testSuite struct {
	prettytest.Suite
    }

    func TestRunner(t *testing.T) {
	prettytest.Run(
		t,
		new(testSuite),
	)
    }
    // End of setup

    // Tests start here
    func (t *testSuite) TestTrueIsTrue() {
	t.True(true)
    }

See example/example_test.go and prettytest_test.go for comprehensive usage examples.

Imports 1 package(s) ΒΆ

  1. launchpad.net/gocheck