Skip to content

An example of how to orchestrate real device testing using custom tagging and a TestNG interceptor.

License

Notifications You must be signed in to change notification settings

gamesys/realdevice-testng-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real Device Execution

Unlike desktops real devices can only handle a single session at a time so you have to orchestrate your test execution more effectively. This project shows an example of how to orchestrate real device testing using custom tagging and a TestNG interceptor.

You can run the tests using various commands and below are a few examples. The code can very much be modified locally to suit your own test execution and tagging needs.

Select devices by device name(s)

You can pass a single device or multiple seperated by a comma.

mvn clean test 
-Dsaucelabs_endpoint=http://eu1.appium.testobject.com/wd/hub
-Dtestobject_api_key=${add_app_specific_api_key}
-Dtestobject_app_id=${add_app_specific_id}
-Dsaucelabs_device_name=${device_name} 
-DtestPhases=REGRESSION 
-Dtags=github

Select devices by platform & version

You can also run a test e.g. against every iOS device (of a specific version)

mvn clean test 
 -Dsaucelabs_endpoint=http://eu1.appium.testobject.com/wd/hub
 -Dtestobject_api_key=${add_app_specific_api_key}
 -Dtestobject_app_id=${add_app_specific_id}
 -Dsaucelabs_platform_name=iOS 
 -Dsaucelabs_platform_version=11.2.5
 -DtestPhases=REGRESSION 
 -Dtags=github

Filtering test by tags

The remaining two arguments shown above ("tags", "testPhases") are specific for filtering and will select the test cases to be executed based on the tags added in the @TestTags annotation.

License

This project is released under MIT license. Copyright (c) 2018 Gamesys Limited. All rights reserved.

About

An example of how to orchestrate real device testing using custom tagging and a TestNG interceptor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages