This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Command Line Interface
jvanderwee edited this page Jan 3, 2015
·
3 revisions
Tests can be executed by running mvn clean verify
followed by any properties you wish to specify.
Property | Description | Values |
---|---|---|
browser |
The browser on which you wish to run the tests. Defaults to phantomjs if not specified. |
firefox , chrome , safari , ie , opera , phantomjs , android
|
build |
The build version or app version to log to Sauce Labs. Not mandatory and is only taken into consideration when running on Sauce Labs. | e.g. build-1234
|
browserVersion |
The browser version on which you wish to run the tests. Not mandatory and is only taken into consideration when running remotely e.g. on Selenium Grid or Sauce Labs. | e.g. 8.0
|
deviceName |
The device on which you wish to run the Appium tests. Defaults to iPhone Simulator if you have specified iOS as the platform, or Android Emulator if you have specified Android. |
iPhone Simulator , iPad Simulator , iPhone Retina 4-inch , Android Emulator , Galaxy S4 , etc…. |
groups |
The TestNG test groups which you wish to run. All tests groups will run if not specified. | e.g. checkintest
|
platform |
The platform on which you wish to run the tests. Is only taken into consideration when running remotely e.g. on Selenium Grid or Sauce Labs and is mandatory when using Appium. | e.g. windows , ios , android
|
platformVersion |
The platform version on which you wish to run the tests. Is only taken into consideration when running remotely e.g. on Selenium Grid or Sauce Labs. Defaults to 8.1 if you have specified iOS as the platform, or 5.0 if you have specified Android. |
e.g. 5.0
|
sauce |
Must be set to true if you wish to run on Sauce Labs. Defaults to false. |
true , false
|
seleniumGridURL |
The URL of your Selenium Grid hub. Mandatory if you wish to run your tests on your Selenium Grid. | e.g. http://localhost:4444/wd/hub
|
threads |
The number of threads to use. Defaults to 1 if not specified. | e.g. 3
|
Running web tests using PhantomJS:
mvn clean verify
Running web tests using Chrome:
mvn clean verify -Dbrowser=chrome
Running web tests on Firefox 34.0.5 with Selenium Grid:
mvn clean verify -Dbrowser=firefox -DbrowserVersion=34.0.5 -DseleniumGridURL=http://localhost:4444/wd/hub
Running mobile web tests on Sauce Labs iOS 8.0 iPad Simulator:
export SAUCE_USERNAME=<username>
export SAUCE_ACCESS_KEY=<access_key>
mvn clean verify -Dsauce=true -Dplatform=ios -Dbrowser=safari -DplatformVersion=8.0 -DdeviceName="iPad Simulator"
Running mobile app tests on Sauce Labs Android Emulator:
export SAUCE_USERNAME=<username>
export SAUCE_ACCESS_KEY=<access_key>
mvn clean verify -Dsauce=true -Dplatform=android -DappPath=<path_to_.apk>