Environment variables
Using environment variables is a powerful way of running the same tests in different environments.
.env
file#
You can add environment variables in your .env
file, and Capter will automatically read it.
#
InlineYou can also run the CLI with the environment variables inline in the command:
#
Using the variablesTo use the environment variable, you can use the template tag syntax and the env
context:
#
Variables in CIWhen you run the CLI in a CI environment, all environment variables provided by that CI will be available in the env
scope. For example, if you use GitHub Actions, this is what you can do.