ginkgo

command
v0.0.0-...-3f44578 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Overview

The Ginkgo CLI

The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli)

To install:

go install github.com/pivotal/gumshoe/repos/ginkgo/ginkgo

To run tests:

ginkgo

To run tests in all subdirectories:

ginkgo -r

To run tests in particular packages:

ginkgo <flags> /path/to/package /path/to/another/package

To run tests in parallel

ginkgo -nodes=N

where N is the number of nodes. By default the Ginkgo CLI will spin up a server that the individual test processes stream test output to. The CLI then aggregates these streams into one coherent stream of output. An alternative is to have the parallel nodes run and then present the resulting, final, output in one monolithic chunk - you can opt into this if streaming is giving you trouble:

ginkgo -nodes=N -stream=false

On windows, the default value for stream is false.

By default, when running multiple tests (with -r or a list of packages) Ginkgo will abort when a test fails. To have Ginkgo run subsequent test suites instead you can:

ginkgo -keepGoing

To monitor packages and rerun tests when changes occur:

ginkgo -watch <-r> </path/to/package>

passing `ginkgo -watch` the `-r` flag will recursively detect all test suites under the current directory and monitor them. `-watch` does not detect *new* packages. Moreover, changes in package X only rerun the tests for package X, tests for packages that depend on X are not rerun.

[OSX only] To receive (desktop) notifications when a test run completes:

ginkgo -notify

this is particularly useful with `ginkgo -watch`. Notifications are currently only supported on OS X and require that you `brew install terminal-notifier`

Sometimes (to suss out race conditions/flakey tests, for example) you want to keep running a test suite until it fails. You can do this with:

ginkgo -untilItFails

To bootstrap a test suite:

ginkgo bootstrap

To generate a test file:

ginkgo generate <test_file_name>

To unfocus tests:

ginkgo unfocus

To print out Ginkgo's version:

ginkgo version

To get more help:

ginkgo help

Directories

Path Synopsis
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output as one coherent stream.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output as one coherent stream.
support
fsnotify
Package fsnotify implements filesystem notification.
Package fsnotify implements filesystem notification.

Jump to

Keyboard shortcuts

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