Skip to content

Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.

License

Notifications You must be signed in to change notification settings

andeya/goconvey

 
 

Repository files navigation

GoConvey is awesome Go testing

Build Status GoDoc

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. View full feature tour.

Features:

  • Directly integrates with go test
  • Fully-automatic web UI (works with native Go tests, too)
  • Huge suite of regression tests
  • Shows test coverage (Go 1.2+)
  • Readable, colorized console output (understandable by any manager, IT or not)
  • Test code generator
  • Desktop notifications (optional)
  • Immediately open problem lines in Sublime Text (some assembly required)

Menu:

Installation

$ go get github.com/smartystreets/goconvey

Make a test, for example:

func TestSpec(t *testing.T) {

	// Only pass t into top-level Convey calls
	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)
			})
		})
	})
}

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.

Just do what you do best:

$ go test

Or if you want the output to include the story:

$ go test -v

Check out the

  • GoConvey wiki,
  • GoDoc
  • and the *_test.go files scattered throughout this project.

For web UI and terminal screenshots, check out the full feature tour.

Contributors (Thanks!)

GoConvey is brought to you by SmartyStreets; in particular:

You can track the progress of known issues on our public Trello board. If you'd like to discuss a new feature idea or think you've found a bug, please send an email to goconvey@smartystreets.com.

About

Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 68.0%
  • JavaScript 13.9%
  • CSS 12.4%
  • HTML 5.7%