To run your tests, do what you do best in your terminal:

  1. go test

Example output: (real output is colorized)

  1. .....
  2. 5 assertions and counting
  3. ....
  4. 9 assertions and counting
  5. PASS
  6. ok github.com/smartystreets/goconvey/examples 0.022s

You can also use -v for verbose:

  1. go test -v

Example output: (real output is colorized)

  1. === RUN TestScoring
  2. Subject: Bowling Game Scoring
  3. Given a fresh score card
  4. When all gutter balls are thrown
  5. The score should be zero
  6. When all throws knock down only one pin
  7. The score should be 20
  8. When a spare is thrown
  9. The score should include a spare bonus.
  10. When a strike is thrown
  11. The score should include a strike bonus.
  12. When all strikes are thrown
  13. The score should be 300.
  14. 5 assertions and counting
  15. --- PASS: TestScoring (0.00 seconds)
  16. === RUN TestSpec
  17. Subject: Integer incrementation and decrementation
  18. Given a starting integer value
  19. When incremented
  20. The value should be greater by one
  21. The value should NOT be what it used to be
  22. When decremented
  23. The value should be lesser by one
  24. The value should NOT be what it used to be
  25. 9 assertions and counting
  26. --- PASS: TestSpec (0.00 seconds)
  27. PASS
  28. ok github.com/smartystreets/goconvey/examples 0.023s

Auto-test and web UI

If you're tired of hitting , Enter all the time, try running tests automatically.

If you're tired of the terminal altogether, check out the web UI which displays test output elegantly in the browser.

Next

Finally, learn about Skip to skip/ignore scopes and assertions.