ACK_GINKGO_DEPRECATIONS=<semver>
environment variable.Advertise Ginkgo 2.0. Introduce deprecations. [9ef1913]
Add slim-sprig template functions to bootstrap/generate (#775) [9162b86]
-focus
and -skip
flags (#780) [e90a4a0]system-out
element instead of passed
(#769) [9eda305]extensions/globals
package (#692) [3295c8f] - this can be helpful in contexts where you are test-driving your test-generation code (see #692)generate
command (#578) [9c89e3f]go test
(#562) [3cd45fa]go vet
to pass [69338ec]-coverprofile
and -outputdir
flags, Ginkgo fails with an error if the directory does not exist. This is due to an issue in go 1.10 (#446) [b36a6e0]unfocus
command ignores vendor folder (#459) [e5e551c, c556e43, a3b6351, 9a820dd]ginkgo
now provides a hint if you accidentally forget to run ginkgo bootstrap
to generate a *_suite_test.go
file that actually invokes the Ginkgo test runner. #345go test -c
ginkgo
no longer needs to fix Go's compilation output to ensure compilation errors are expressed relative to the CWD. [#357]ginkgo watch -watchRegExp=...
allows you to specify a custom regular expression to watch. Only files matching the regular expression are watched for changes (the default is \.go$
) [#356]ginkgo
now always emits compilation output. Previously, only failed compilation output was printed out. [#277]ginkgo -requireSuite
now fails the test run if there are *_test.go
files but go test
fails to detect any tests. Typically this means you forgot to run ginkgo bootstrap
to generate a suite file. [#344]ginkgo -timeout=DURATION
allows you to adjust the timeout for the entire test suite (default is 24 hours) [#248]Improvements:
Skip(message)
can be used to skip the current test.extensions/table
- a Ginkgo DSL for Table Driven TestsGinkgoRandomSeed()
- shorthand for config.GinkgoConfig.RandomSeed
--flakeAttempts
ginkgo ./...
now recurses as you'd expectSpecify
a synonym for It
ginkgo
CLIBug Fixes:
panic(nil)
(#167)Improvements
ginkgo -coverpkg
calls down to go test -coverpkg
(#160)ginkgo -afterSuiteHook COMMAND
invokes the passed-in COMMAND
after a test suite completes (#152)ginkgo
now works with Go v1.3+ (#166)Ginkgo now requires Go 1.4+
Improvements:
Call reporters in reverse order when announcing spec completion -- allows custom reporters to emit output before the default reporter does.
Improved focus behavior. Now, this:
FDescribe("Some describe", func() {
It("A", func() {})
FIt("B", func() {})
})
will run B
but not A
. This tends to be a common usage pattern when in the thick of writing and debugging tests.
When SIGINT
is received, Ginkgo will emit the contents of the GinkgoWriter
before running the AfterSuite
. Useful for debugging stuck tests.
When --progress
is set, Ginkgo will write test progress (in particular, Ginkgo will say when it is about to run a BeforeEach, AfterEach, It, etc...) to the GinkgoWriter
. This is useful for debugging stuck tests and tests that generate many logs.
Improved output when an error occurs in a setup or teardown block.
When --dryRun
is set, Ginkgo will walk the spec tree and emit to its reporter without actually running anything. Best paired with -v
to understand which specs will run in which order.
Add By
to help document long It
s. By
simply writes to the GinkgoWriter
.
Add support for precompiled tests:
ginkgo build <path-to-package>
will now compile the package, producing a file named package.test
package.test
file can be run directly. This runs the tests in series.ginkgo -p package.test
Support bootstrap
ping and generate
ing Agouti specs.
ginkgo generate
and ginkgo bootstrap
now honor the package name already defined in a given directory
The ginkgo
CLI ignores SIGQUIT
. Prevents its stack dump from interlacing with the underlying test suite's stack dump.
The ginkgo
CLI now compiles tests into a temporary directory instead of the package directory. This necessitates upgrading to Go v1.4+.
ginkgo -notify
now works on Linux
Bug Fixes:
ginkgo -p
would hang if a process spawned by one of the Ginkgo parallel nodes does not exit. (Hooray!)No changes, just dropping the beta.
New Features:
ginkgo watch
now monitors packages and their dependencies for changes. The depth of the dependency tree can be modified with the -depth
flag.FIt
, FDescribe
, etc...) exit with non-zero status code, even when they pass. This allows CI systems to detect accidental commits of focused test suites.ginkgo -p
runs the testsuite in parallel with an auto-detected number of nodes.ginkgo -tags=TAG_LIST
passes a list of tags down to the go build
command.ginkgo --failFast
aborts the test suite after the first failure.ginkgo generate file_1 file_2
can take multiple file arguments.ginkgo --randomizeSuites
will run tests suites in random order using the generated/passed-in seed.Improvements:
ginkgo -skipPackage
now takes a comma-separated list of strings. If the relative path to a package matches one of the entries in the comma-separated list, that package is skipped.ginkgo --untilItFails
no longer recompiles between attempts.It
, BeforeEach
, JustBeforeEach
, AfterEach
, Measure
) is nested within another runnable node. This is always a mistake. Any test suites that panic because of this change should be fixed.Bug Fixes:
ginkgo boostrap
and ginkgo generate
no longer fail when dealing with hyphen-separated-packages
.New Features:
GinkgoParallelNode()
- shorthand for config.GinkgoConfig.ParallelNode
Improvements:
--untilItFails
and ginkgo watch
now generate new random seeds between test runs, unless a particular random seed is specified.Bug Fixes:
-cover
now generates a correctly combined coverprofile when running with in parallel with multiple -node
s.GinkgoWriter
when BeforeSuite
or AfterSuite
fail.Breaking changes:
thirdparty/gomocktestreporter
is gone. Use GinkgoT()
insteadwatch
is now a subcommand, not a flag.DSL changes:
BeforeSuite
and AfterSuite
for setting up and tearing down test suites.AfterSuite
is triggered on interrupt (^C
) as well as exit.SynchronizedBeforeSuite
and SynchronizedAfterSuite
for setting up and tearing down singleton resources across parallel nodes.CLI changes:
watch
is now a subcommand, not a flag--nodot
flag can be passed to ginkgo generate
and ginkgo bootstrap
to avoid dot imports. This explicitly imports all exported identifiers in Ginkgo and Gomega. Refreshing this list can be done by running ginkgo nodot
--
separator--skipPackage
flag takes a regexp and ignores any packages with package names passing said regexp.--trace
flag prints out full stack traces when errors occur, not just the line at which the error occurs.Misc:
Major refactor:
internal
example
everywhere to spec