goconvey

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

Github星跟踪图

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 to 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)

You can ask questions about how to use GoConvey on StackOverflow. Use the tags go and goconvey.

Menu:

Installation

$ go get github.com/smartystreets/goconvey

Quick start

Make a test, for example:

package package_name

import (
    "testing"
    . "github.com/smartystreets/goconvey/convey"
)

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)
			})
		})
	})
}

In the browser

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

$ $GOPATH/bin/goconvey

Then watch the test results display in your browser at:

http://localhost:8080

If the browser doesn't open automatically, please click http://localhost:8080 to open manually.

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.

Contributors

GoConvey is brought to you by SmartyStreets and several contributors (Thanks!).

主要指标

概览
名称与所有者smartystreets/goconvey
主编程语言Go
编程语言Go (语言数: 5)
平台
许可证Other
所有者活动
创建于2013-08-21 04:52:28
推送于2024-07-30 12:11:32
最后一次提交2024-03-05 22:24:57
发布数29
最新版本名称v1.8.1 (发布于 2023-06-28 09:44:27)
第一版名称v1.0 (发布于 2013-09-16 23:33:11)
用户参与
星数8.4k
关注者数159
派生数555
提交数1.2k
已启用问题?
问题数499
打开的问题数157
拉请求数142
打开的拉请求数10
关闭的拉请求数47
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?