MCPcopy Index your code
hub / github.com/smartystreets/goconvey

github.com/smartystreets/goconvey @v1.8.1 sqlite

repository ↗ · DeepWiki ↗ · release v1.8.1 ↗
1,033 symbols 2,976 edges 83 files 93 documented · 9% 24 cross-repo links
README

SMARTY DISCLAIMER: Subject to the terms of the associated license agreement, this software is freely available for your use. This software is FREE, AS IN PUPPIES, and is a gift. Enjoy your new responsibility. This means that while we may consider enhancement requests, we may or may not choose to entertain requests at our sole and absolute discretion.

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.

GoConvey supports the current versions of Go (see the official Go release policy). Currently this means Go 1.16 and Go 1.17 are supported.

Features:

  • Directly integrates with go test
  • Fully-automatic web UI (works with native Go tests, too)
  • Huge suite of regression tests
  • Shows test coverage
  • 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 install 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.

Contributors

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

Extension points exported contracts — how you extend this code

Reporter (Interface)
(no doc) [10 implementers]
convey/reporting/reporter.go
C (Interface)
suite ////////////////////////////////// C is the Convey context which you can optionally obtain in your action by calli [1 …
convey/doc.go
Executor (Interface)
(no doc) [2 implementers]
web/server/contract/contracts.go
T (Interface)
This interface allows us to pass the *testing.T struct throughout the internals of this tool without ever having to impo [2 …
convey/reporting/init.go
Assertion (FuncType)
Assertions /////////////////////////////////// Assertion is an alias for a function with a signature that the convey.So(
convey/doc.go
Shell (Interface)
(no doc) [2 implementers]
web/server/contract/contracts.go
Parser (Interface)
(no doc) [2 implementers]
web/server/executor/contract.go
Tester (Interface)
(no doc) [2 implementers]
web/server/executor/contract.go

Core symbols most depended-on inside this repo

Convey
called by 328
convey/doc.go
So
called by 255
convey/doc.go
current
called by 56
web/client/resources/js/goconvey.js
show
called by 55
convey/reporting/problems.go
addRegexToken
called by 51
web/client/resources/js/lib/moment.js
jQuery
called by 46
web/client/resources/js/lib/jquery.js
Println
called by 41
convey/doc.go
log
called by 34
web/client/resources/js/goconvey.js

Shape

Function 705
Method 259
Struct 53
Interface 9
TypeAlias 6
FuncType 1

Languages

Go61%
TypeScript39%

Modules by API surface

web/client/resources/js/lib/moment.js189 symbols
web/client/resources/js/lib/jquery.js81 symbols
web/client/resources/js/lib/jquery-ui.js54 symbols
web/client/resources/js/goconvey.js44 symbols
convey/isolated_execution_test.go39 symbols
convey/reporting_hooks_test.go30 symbols
convey/doc.go30 symbols
web/server/executor/tester_test.go23 symbols
web/server/parser/package_parser_test.go22 symbols
web/server/api/server_test.go21 symbols
convey/context.go21 symbols
web/server/parser/testParser.go20 symbols

Dependencies from manifests, versioned

github.com/jtolds/glsv4.20.0+incompatible · 1×
github.com/smarty/assertionsv1.15.0 · 1×
golang.org/x/modv0.9.0 · 1×
golang.org/x/sysv0.6.0 · 1×
golang.org/x/toolsv0.7.0 · 1×

For agents

$ claude mcp add goconvey \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact