There are several test that need to be executed to be able to test the module. When adding a PR all tests must at least pass the local tests. Each PR is automatically tested against Sauce Labs, see Travis-ci with Sauce Labs. Before approving a PR the core contributers will test the PR against emulators / simulators / real devices.
Make sure a local webdriver is installed, see How to run a local webdriver and start your webdriver. (DirectConnect from protractor itself is not stable enough to run our tests, that's why we we use a local webdriver).
First a local baseline needs to be created. This can be done with npm run test.init
. This command will create a folder called localBaseline
that will hold all the baseline images.
Then run npm run test.local
. This will run all tests on a local machine on Chrome (job uses direct connect, first run npm run wd-update
to update the webdriver.
This needs to be done once after install).
If you never installed a local webdriver, follow steps 1 and 2, else start the webdriver with step 3
- install a local webdriver with
npm install webdriver-manager -g
- then
webdriver-manager update
to download all the webdrivers - then
webdriver-manager start
, this will start a webdriver onlocalhost:4444
First make sure Appium v 1.5.3 or higher is installed
npm run test.android.adb
: Run all tests with Appium on an Android emulator with the ADB driver on Chrome (appium --port 4728 --avd AVD_for_Nexus_5_by_Google
)npm run test.android.chromedriver
: Run all tests with Appium on an Android emulator with the ChromeDriver on Chrome (appium --port 4727 --avd AVD_for_Nexus_5_by_Google
)npm run test.ios.simulator
: Run all tests with Appium on Apple iOS simulator on Safari (appium --port 4726
)
Make sure you have an account and create a perfecto.config.json
file in the root of this project with a user
, a password
- and a seleniumAddress
key! like this:
{
"password": "password",
"user": "username",
"seleniumAddress": "https://yourcloud.perfectomobile.com/nexperience/perfectomobile/wd/hub/"
}
npm run test.perfecto
: Run all tests on a real:
- Apple iOS device on Safari in the cloud
- Samsung Android on Chrom in the cloud
Credentials are needed to be able to test this
The command below is used to test the build on Travis-ci, it can only be used there and not for local development.
npm run test.ci
It will test against a lot of configurations that can be found here.
All PR's are automatically checked against Sauce Labs.