I need help working an all inclusive test case/test suite collection execution.
In my test case I need to specify run with to determine if the testing will run the mobile app, web mobile or desktop web testing.
Here is a rudimentary concept of what I’m asking for:
Test Suite Collection Execution Settings:
No. ID **Run with ** Run configuration Profile Run
1 Test Suite Name Chrome Default X
2 Test Suite Name Kobiton Device Galaxy S6 Edge 6.0.1 Default X
3 Test Suite Name Kobiton Device Nexus 5 4.4.4 Default X
Run with
The selection of “Chrome” runs the test suite on the desktop Chrome browser for desktop web testing.
The selection of “Kobiton Device - Galaxy S6 Edge 6.0.1” runs the test suite on the Chrome browser for web mobile testing.
The selection of “Kobiton Device - Nexus 5 4.4.4” runs the test suite as mobile app testing.
Then Determine which selection from above to run the appropriate test steps for mobile app, web mobile or desktop web testing.
Within the test case:
if (Nexus 5 4.4.4 - determined from the run with executions settings) {
Mobile.startApplication(‘kobiton-store:####’, true)
Mobile.closeApplication()
} else {
WebUI.openBrowser(‘’)
WebUI.closeBrowser()
}
Problem - I’m not exactly sure, but I believe “Mobile.” and “WebUI.” set the type of testing before desired capabilities can even be determined (i.e. “WebUI.openBrowser” executes before “deviceName”, “platform”, etc. are retrieved…but “runs with” is determine before the test case even starts.
How can I tie the execution settings into test steps in order to run the correct type of testing on a specific device/browser?