argsdirectives to specify how the test is run. If the execution exits with 0, the test is considered to have passed, otherwise failed.
--skip-testsflag or, alternatively, specify what tests to run with the
garden run test <test-name>command. This will run the test regardless of whether or not the result is cached.
garden get test-result <module-name> <test-name>.
frontendmodule that has a
unittest and an
integtest that depends on a
integtest checks whether the frontend gets the correct response from the backend. The example is based on our vote example project.
integtest looks like this:
frontend, Garden will re-run both the
integtests for you.
backendmodule, Garden will first re-build and re-deploy the
backend, and then run the
integtest defined for the
helm, allow you to extract artifacts after tests have been run. This can be handy when you'd like to view reports or logs, or if you'd like a script (via a local
execmodule, for instance) to validate the output from a test.
artifactsfield on test configurations. For example, for the
containermodule, you can do something like this:
my-test, you can find the contents of the
reportdirectory in the test's container, locally under
disabled: truein the test configuration. You can also disable them conditionally using template strings. For example, to disable a
containermodule test for a specific environment, you could do something like this:
execmodule type runs tests locally in your shell. By default, the
execmodule type executes tests in the Garden build directory (under
.garden/build/<module-name>). By setting
local: true, the tests are executed in the module source directory instead.
serviceResourceneeds to be specified to determine the pod spec for the test pod. You can see the whole pod spec used in the reference docs for kubernetes and helm modules. Please note that the
readinessProbeare stripped from your pod spec. Health checks for your application might fail when the container is used for testing because the main process usually running in that container is replaced by the test command.