(Assuming you already set your GOPATH and did …)

In your terminal:

  • cd to your project's path

  • From now on, you need only run the goconvey server:
  • Automatically updates when files are changed
  • Test code generator
  • Browser notifications (with enable/disable and the option to notify on any status, only success, or only panic/failure)
  • Colored diff on most failing tests' outputs
  • Nested display of GoConvey tests for easy reading
  • Supports traditional Go tests
  • Panics, failed builds, and failed tests are highlighted
  • Silky-smooth appearance and transitions
  • Direct link to the problem lines (opens your favorite editor—)
    Scroll to the bottom for a graphical feature tour.

Click the "Code Gen" link in the top-right corner to open the code generator. Type your test descriptors in the textbox, and use Tab to indent. Test stubs will automatically be created for you which you can then copy+paste into your Go test file.

The idea is to describe your program's behavior in a natural, flowing way.

There are a few to notice:

  • Lines starting with "Test" (case-sensitive), without indentation, are treated as the name of the test function
  • Tab indentation defines scope
  • Assertions are not made here; you'll do that later after pasting the generated code into your _test.go file.