Redesigned server:
Removed legacy (prototype) server.
8 files changed
tree: 6b8dd52838be58514f876c7bddab08a621322f9f
  1. assertions/
  2. convey/
  3. examples/
  4. execution/
  5. gotest/
  6. printing/
  7. reporting/
  8. scripts/
  9. web/
  10. .gitignore
  11. goconvey.go
  12. license.txt
  13. README.md
README.md

GoConvey is awesome Go testing

Welcome to GoConvey, a yummy Go testing tool for gophers. Works with go test. Use it in the terminal or browser according your viewing pleasure.

Features:

  • Directly integrates with go test
  • Huge suite of regression tests
  • Readable, colorized console output (understandable by any manager, IT or not)
  • Fully-automatic web UI (works with native Go tests, too)
  • Test code generator
  • Auto-test script automatically runs tests in the terminal
  • Immediately open problem lines in Sublime Text (some assembly required)

Menu:

Installation

$ go get github.com/smartystreets/goconvey

Quick start

Make a test, for example:

func TestSpec(t *testing.T) {
	var x int
	
	Convey("Given some integer with a starting value", t, func() {
		x = 1

		Convey("When the integer is incremented", func() {
			x++

			Convey("The value should be greater by one", func() {
				So(x, ShouldEqual, 2)
			})
		})
	})
}

In the browser

Start up the GoConvey web server at your project's path:

$ $GOPATH/bin/goconvey

Then open your browser to:

http://localhost:8080

There you have it. As long as GoConvey is running, test results will automatically update in your browser window. The design is responsive, so you can squish the browser real tight if you need to put it beside your code.

The web UI supports traditional Go tests, so use it even if you're not using GoConvey tests.

In the terminal

Just do what you do best:

$ go test

Or if you want the output to include the story:

$ go test -v

Web UI

GoConvey browser interface

Terminal output (with go test -v):

Tests pass:

Pass

Test fail:

Fail

Test panic:

Panic

Contributors (Thanks!):