Controlling Test Order
--ginkgo.seed [int] (default: randomly generated by Ginkgo)
The seed used to randomize the spec suite.
--ginkgo.randomize-all
If set, ginkgo will randomize all specs together. By default, ginkgo only
randomizes the top level Describe, Context and When containers.
Controlling Test Parallelism
These are set by the Ginkgo CLI, do not set them manually via go test.
Use ginkgo -p or ginkgo -procs=N instead.
--ginkgo.parallel.process [int] (default: 1)
This worker process's (one-indexed) process number. For running specs in
parallel.
--ginkgo.parallel.total [int] (default: 1)
The total number of worker processes. For running specs in parallel.
--ginkgo.parallel.host [string] (default: set by Ginkgo CLI)
The address for the server that will synchronize the processes.
Filtering Tests
--ginkgo.label-filter [expression]
If set, ginkgo will only run specs with labels that match the label-filter.
The passed-in expression can include boolean operations (!, &&, ||, ','),
groupings via '()', and regular expressions '/regexp/'. e.g. '(cat || dog)
&& !fruit'
--ginkgo.sem-ver-filter [version]
If set, ginkgo will only run specs with semantic version constraints that
are satisfied by the provided version. e.g. '2.1.0'
--ginkgo.focus [string]
If set, ginkgo will only run specs that match this regular expression. Can
be specified multiple times, values are ORed.
--ginkgo.skip [string]
If set, ginkgo will only run specs that do not match this regular
expression. Can be specified multiple times, values are ORed.
--ginkgo.focus-file [file (regexp) | file:line | file:lineA-lineB | file:line,line,line]
If set, ginkgo will only run specs in matching files. Can be specified
multiple times, values are ORed.
--ginkgo.skip-file [file (regexp) | file:line | file:lineA-lineB | file:line,line,line]
If set, ginkgo will skip specs in matching files. Can be specified multiple
times, values are ORed.
Failure Handling
--ginkgo.fail-on-pending
If set, ginkgo will mark the test suite as failed if any specs are pending.
--ginkgo.fail-fast
If set, ginkgo will stop running a test suite after a failure occurs.
--ginkgo.flake-attempts [int] (default: 0 - failed tests are not retried)
Make up to this many attempts to run each spec. If any of the attempts
succeed, the suite will not be failed.
--ginkgo.fail-on-empty
If set, ginkgo will mark the test suite as failed if no specs are run.
Controlling Output Formatting
--ginkgo.no-color
If set, suppress color output in default reporter. You can also set the
environment variable GINKGO_NO_COLOR=TRUE
--ginkgo.v
If set, emits more output including GinkgoWriter contents.
--ginkgo.vv
If set, emits with maximal verbosity - includes skipped and pending tests.
--ginkgo.succinct
If set, default reporter prints out a very succinct report
--ginkgo.trace
If set, default reporter prints out the full stack trace when a failure
occurs
--ginkgo.show-node-events
If set, default reporter prints node > Enter and < Exit events when specs
fail
--ginkgo.github-output
If set, default reporter prints easier to manage output in Github Actions.
--ginkgo.silence-skips
If set, default reporter will not print out skipped tests.
--ginkgo.force-newlines
If set, default reporter will ensure a newline appears after each test.
--ginkgo.json-report [filename.json]
If set, Ginkgo will generate a JSON-formatted test report at the specified
location.
--ginkgo.gojson-report [filename.json]
If set, Ginkgo will generate a Go JSON-formatted test report at the
specified location.
--ginkgo.junit-report [filename.xml]
If set, Ginkgo will generate a conformant junit test report in the specified
file.
--ginkgo.teamcity-report [filename]
If set, Ginkgo will generate a Teamcity-formatted test report at the
specified location.
Debugging Tests
In addition to these flags, Ginkgo supports a few debugging environment
variables. To change the parallel server protocol set GINKGO_PARALLEL_PROTOCOL
to HTTP. To avoid pruning callstacks set GINKGO_PRUNE_STACK to FALSE.
--ginkgo.dry-run
If set, ginkgo will walk the test hierarchy without actually running
anything. Best paired with -v.
--ginkgo.poll-progress-after [duration] (default: 0)
Emit node progress reports periodically if node hasn't completed after this
duration.
--ginkgo.poll-progress-interval [duration] (default: 10s)
The rate at which to emit node progress reports after poll-progress-after
has elapsed.
--ginkgo.source-root [string]
The location to look for source code when generating progress reports. You
can pass multiple --source-root flags.
--ginkgo.timeout [duration] (default: 1h)
Test suite fails if it does not complete within the specified timeout.
--ginkgo.grace-period [duration] (default: 30s)
When interrupted, Ginkgo will wait for GracePeriod for the current running
node to exit before moving on to the next one.
--ginkgo.output-interceptor-mode [dup, swap, or none]
If set, ginkgo will use the specified output interception strategy when
running in parallel. Defaults to dup on unix and swap on windows.
Go test flags
-enable-webhooks
Enable webhooks
-kubeconfig string
Paths to a kubeconfig. Only required if out-of-cluster.
-leader-election
Should the controller use leader election
-leader-election-id string
Name of the configmap used by the leader election system
-leader-election-namespace string
Namespace for the configmap used by the leader election system
-namespaces string
Comma-separated list of namespaces to watch. Defaults to all namespaces.
-sync-period duration
Reconcile sync period
-update-burst int
Global maximum burst size for updates (default: 100 immediate updates allowed)
-update-rate float
Global maximum update rate per second (default: 1.0 = 1 update per second)
-version
Show version and exit
-zap-devel
Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
-zap-encoder value
Zap log encoding (one of 'json' or 'console')
-zap-log-level value
Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', 'panic'or any integer value > 0 which corresponds to custom debug levels of increasing verbosity
-zap-stacktrace-level value
Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').
-zap-time-encoding value
Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'.
Options (38)
| Option | Description | Source |
|---|
--ginkgo.randomize-all | If set, ginkgo will randomize all specs together. | help |
--ginkgo.label-filter expression | If set, ginkgo will only run specs with labels that match the label-filter. | help |
--ginkgo.sem-ver-filter version | If set, ginkgo will only run specs with semantic version constraints that are satisfied by the provided version. | help |
--ginkgo.focus string | If set, ginkgo will only run specs that match this regular expression. | help |
--ginkgo.skip string | If set, ginkgo will only run specs that do not match this regular expression. | help |
--ginkgo.fail-on-pending | If set, ginkgo will mark the test suite as failed if any specs are pending. | help |
--ginkgo.fail-fast | If set, ginkgo will stop running a test suite after a failure occurs. | help |
--ginkgo.fail-on-empty | If set, ginkgo will mark the test suite as failed if no specs are run. | help |
--ginkgo.no-color | If set, suppress color output in default reporter. | help |
--ginkgo.v | If set, emits more output including GinkgoWriter contents. | help |
--ginkgo.vv | If set, emits with maximal verbosity - includes skipped and pending tests. | help |
--ginkgo.succinct | If set, default reporter prints out a very succinct report | help |
--ginkgo.trace | If set, default reporter prints out the full stack trace when a failure occurs | help |
--ginkgo.show-node-events | If set, default reporter prints node > Enter and < Exit events when specs fail | help |
--ginkgo.github-output | If set, default reporter prints easier to manage output in Github Actions. | help |
--ginkgo.silence-skips | If set, default reporter will not print out skipped tests. | help |
--ginkgo.force-newlines | If set, default reporter will ensure a newline appears after each test. | help |
--ginkgo.json-report filename.json | If set, Ginkgo will generate a JSON-formatted test report at the specified location. | help |
--ginkgo.gojson-report filename.json | If set, Ginkgo will generate a Go JSON-formatted test report at the specified location. | help |
--ginkgo.junit-report filename.xml | If set, Ginkgo will generate a conformant junit test report in the specified file. | help |
--ginkgo.teamcity-report filename | If set, Ginkgo will generate a Teamcity-formatted test report at the specified location. | help |
--ginkgo.dry-run | If set, ginkgo will walk the test hierarchy without actually running anything. | help |
--ginkgo.source-root string | The location to look for source code when generating progress reports. | help |
-enable-webhooks | Enable webhooks | help |
-kubeconfig string | Paths to a kubeconfig. | help |
-leader-election | Should the controller use leader election | help |
-leader-election-id string | Name of the configmap used by the leader election system | help |
-leader-election-namespace string | Namespace for the configmap used by the leader election system | help |
-namespaces string | Comma-separated list of namespaces to watch. | help |
-sync-period duration | Reconcile sync period | help |
-update-burst int | Global maximum burst size for updates (default: 100 immediate updates allowed) | help |
-update-rate float | Global maximum update rate per second (default: 1.0 = 1 update per second) | help |
-version | Show version and exit | help |
-zap-devel | Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). | help |
-zap-encoder value | Zap log encoding (one of 'json' or 'console') | help |
-zap-log-level value | Zap Level to configure the verbosity of logging. | help |
-zap-stacktrace-level value | Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic'). | help |
-zap-time-encoding value | Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). | help |
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.