Command Line Tool
The goat
command is used to create, validate and execute Goatfiles.
You can pass one or multiple Goatfiles or directories as positional arguments. For example:
goat issue_32.goat tests/integrationtests
When passing in a directory, Goat will look for any *.goat
files recursively. Files and directories prefixed with an underscore (_
) are ignored. This is especially useful for Goatfiles which are only supposed to be imported or executed in other Goatfiles. If you want to read more about this, take a look into the Project Structure section.
Flags
In the following, further information is provided about the various flags which can be passed to the goat
CLI.
-
-a ARGS
,--args ARGS
Pass params into the execution as key-value pairs. If you want to pass multiple args, specify each pair with its own parameter.
Example:-a hello=world -a user.name=foo -a "user.password=bar bazz"
-
--delay DELAY
,-d DELAY
Delay all requests by the given duration. The duration is formatted according to the format of Go'stime.ParseDuration
function.
Example:-d 1m30s
-
--dry
Only parse the Goatfile(s) without executing any requests. -
--gradual
,-g
Advance the execution of each request manually via key-presses. -
--json
Use JSON format instead of pretty console format for logging. -
--loglevel LOGLEVEL
,-l LOGLEVEL
Logging level. Here you can see which values you can use for log levels.
Example:-l trace
-
--new
Create a new base Goatfile. When a file directory name is passed as positional parameter, the new Goatfile will be created under that directory name. -
--no-abort
Do not abort the batch execution on error. -
--no-color
Suppress colored log output. -
--params PARAMS
,-p PARAMS
Pass parameters defined in parameter files. These can be either TOML, YAML or JSON files. If you want to pass multiple parameter files, specify each one with its own parameter.
Example:-p ./local.toml -p ~/credentials.yaml
-
--profile PROFILE
,-P PROFILE
Use parameters from profiles defined in a profile config in your home's configuration directory. Here you can read more about how profiles work.
Example:-P foo -P bar
-
--reduced-errors
,-R
Hide template errors in teardown steps. This can be useful when running tests to hide some noise from failing teardown steps due to missing variables. -
--silent
,-s
Disable all logging output. Onlyprint
andprintln
statements will be printed. This is especially useful if you want to use Goatfiles within other scripts. -
--skip SKIP
Section(s) to be skipped during execution.
Example:--skip teardown
-
--secure
Enable TLS certificate validation. -
--help
,-h
Display the help message. -
--version
Display the installed version.