Config File

Webtau let you specify services url, browser settings, DB url connections, etc in a config file. Depending on getting-started/installation runner you use webtau will read data from a different place. Groovy When you use the Groovy runner, it will look for webtau.cfg.groovy file (default). url = "http://localhost:8080" Note: webtau treats groovy config file as code Java When you use JUnit like runners, e.g. getting-started/installation#junit5 JUnit5, webtau expects file named to be present in test classpath, e.g. test resources: url = http://localhost:8080


Webtau supports environment specific config values, and a way to select which environment to set active during tests run. Groovy url = "http://localhost:8080" environments { qa { url = "" } } To select an active environment using groovy-standalone-runner/introduction Groovy Standalone Runner you can pass env as cli parameter webtau --env=qa Additionally you can use environment varialbe to set an active environment: WEBTAU_ENV=qa . Java url = http://localhost:8080 = To select an active environment you have two options:System property -Denv=qa Environment variable WEBTAU_ENV=qa


Webtau has a list of options you can specify using config file: configuration/options url, browserId, etc.. You can override any value using configuration/options#environment-variable-options environment variables: export WEBTAU_URL=http://another-server export WEBTAU_CHROME_DRIVER_PATH=/path/to/chrome/driver In addition to environment variables, you can use a runner specific way to override:In case of Groovy standalone runner, pass --<option>=<value> : webtau --waitTimeout=25000 --url=http://another-server Pass system property via java -D option: -Durl=http://another-server