goconvey

command module
v0.0.0-...-bff8077 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2013 License: MIT Imports: 16 Imported by: 0

README

GoConvey is awesome Go testing 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)
  • 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
	
	// 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)
			})
		})
	})
}
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

Documentation

Check out the

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

Screenshots

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

Contributions

You can get started on the guidelines page found in our wiki.

Contributors (Thanks!)

We appreciate everyone's contributions to the project! Please see the contributor graphs provided by GitHub for all the credits.

GoConvey is brought to you by SmartyStreets; in particular:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package assertions contains the implementations for all assertions which are referenced in the convey package for use with the So(...) method.
Package assertions contains the implementations for all assertions which are referenced in the convey package for use with the So(...) method.
Package convey contains all of the public-facing entry points to this project.
Package convey contains all of the public-facing entry points to this project.
Package examples contains, well, examples of how to use goconvey to specify behavior of a system under test.
Package examples contains, well, examples of how to use goconvey to specify behavior of a system under test.
Package execution contains internal functionality for executing specifications in an isolated fashion as well as calling reporting hooks at important points in the process.
Package execution contains internal functionality for executing specifications in an isolated fashion as well as calling reporting hooks at important points in the process.
Package gotest contains internal functionality.
Package gotest contains internal functionality.
Package printing contains internal functionality related to console reporting and output.
Package printing contains internal functionality related to console reporting and output.
Package reporting contains internal functionality related to console reporting and output.
Package reporting contains internal functionality related to console reporting and output.
Package scripts contains scripts (pretty unexpected huh?) that facilitate testing and development.
Package scripts contains scripts (pretty unexpected huh?) that facilitate testing and development.
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL