Command line arguments - alandiaz08/e2e-web-framework GitHub Wiki

Command Line Option Argument Documentation
-Dbrowser The browser used to execute the tests. Possible values: chrome, firefox. If no option is provided, Google Chrome will be used.
-Denvironment Environment where the tests will be executed. Possible values are: prod, preprod. Default value: preprod
-Ddomain Domain of WebNextGen where the tests will be executed. The list of domains are defined in config/preprod.yaml and config/prod.yaml. The default domain is: fr_FR
-DwngURL Base URL of WebNextGen. This value takes precedence over -Denvironment and -Ddomain, and it will set the base url of webnextgen. Example -DwngURL=https://www.thefork.com.ar/
-DgridURL The URL of the Selenium Grid. The grid must be running before executing the tests. If no value is provided, then the tests will be executed with the local browser installed in the machine. Example: http://127.0.0.1:4444/wd/hub
-Dthreads Number of threads used to run the tests. This sets the number of threads to use for running tests in parallel. The default value is 1.
--tests Allows to execute a single test class or test method. To execute a single test class: --tests wng.MapTests. To execute a single test method: --tests wng.MapTests.areaWithFewRestaurants.

Examples

Launch the tests using Google Chrome installed locally

./gradlew clean test

Launch the tests using Firefox installed locally

./gradlew clean test -Dbrowser=firefox

Execute a single test class with Google Chrome

./gradlew clean test --tests wng.MapTests

Execute a single test with Google Chrome

./gradlew clean test --tests wng.MapTests.mapGenevaCity

Launch the tests using Google Chrome with 3 threads in parallel

./gradlew clean test -Dbrowser=chrome -Dthreads=3

Launch the tests using Firefox with 3 threads in parallel using Selenium Grid

docker-compose up
./gradlew clean test -Dbrowser=firefox -Dthreads=3 -DgridURL=http://127.0.0.1:4444/wd/hub

Launch the tests in PROD

./gradlew clean test -Denvironment=prod

Launch the tests in PREPROD with domain es_ES http://www.eltenedor.es

./gradlew clean test -Denvironment=preprod -Ddomain=es_ES

Launch the tests with WNG base url https://www.thefork.com.ar

./gradlew clean test -DwngURL=https://www.thefork.com.ar/

Launch a single test method with Firefox, 3 threads, in PROD with domain IT_it, using the selenium grid

docker-compose up
./gradlew clean test -Dbrowser=firefox -Dthreads=3 -Denvironment=prod -Ddomain=IT_it -DgridURL=http://127.0.0.1:4444/wd/hub --tests wng.MapTests.areaWithFewRestaurants