Test execution using teswiz is highly configurable. This enables you to control what type of tests you want to execute, and where (environment, local/cloud), etc.
See all the Configuration parameters here
To run all the tests against the Android platform, run the following command:
PLATFORM=android ./gradlew run
The framework, by default, automatically figures out if there are multiple devices connected to the machine, and if so, will run the tests in parallel
To enable running the tests on pCloudy's Device Farm, the following additional environment variables need to be provided:
RUN_IN_CI=true
- Default isfalse
CLOUD_USER
- pCloudy usernameCLOUD_KEY
- pCloudy password
Sample command:
PLATFORM=android RUN_IN_CI=true CLOUD_USER=myusername CLOUD_KEY=abcd1234abcd ./gradlew run
For other cloud configurations, refer here: https://github.com/AppiumTestDistribution/AppiumTestDistribution
PLATFORM=iOS ./gradlew run
PLATFORM=windows ./gradlew run
PLATFORM=web ./gradlew run
The framework now supports running multiuser scenarios. This means 1 cucumber scenario can orchestrate the interaction between multiple instances of the application-under-test in multiple platforms - ex: Android and Web
Example:
In the above example You can run these tests as below:
TAG=@multiuser-android-web
Current restriction - 1 android device & max 2 web browsers
TAG=@multiuser-web-web
Current restriction - max 2 web browsers
The framework now supports launching web browsers in Mobile Emulation View. Instead of passing simple browser names in steps like 'chrome', 'firefox', etc, you can pass more informative parameters like 'chrome-mobile1', 'safari-mobile2', etc
These informative parameters refer to Browser Config json file for actual device names
Example:
To run tests using a specific apk (instead of the one specified in caps/capabilities.json, OR, caps/pcloudy_capabilties.json, the following additional environment variable need to be provided:
APP_PATH='<path to apk>'
Sample command:
APP_PATH=~/Downloads/MyLatestApp.apk PLATFORM=android ./gradlew run
To run a subset of tests, for a given platform, the following additional environment variables need to be provided:
TAG=@schedule
- This will run all tests tagged with the platform name provided, except tests tagged as "@wip"TAG="@schedule and @signup"
- This will run all tests tagged with the name schedule AND signup for the platform name provided, except tests tagged as "@wip"TAG="@schedule or @signup"
- This will run all tests tagged with the name schedule OR signup for the platform name provided, except tests tagged as "@wip"
Sample commands:
PLATFORM=android TAG=@schedule ./gradlew run`
PLATFORM=android TAG="@schedule and @signup" ./gradlew run`
PLATFORM=android TAG="@schedule or @signup" ./gradlew run`