Cloud Testing Guide
TAFLEX provides native integration with industry-leading cloud testing platforms like BrowserStack and SauceLabs. This allows you to scale your test execution across a vast array of browser/OS combinations and real mobile devices.
đ Why Use Cloud Testing?â
- Infrastructure Agnostic: No need to maintain local browser versions or mobile emulators.
- Parallel Execution: Run tests simultaneously across multiple configurations.
- Real Devices: Test your mobile applications on actual physical hardware in the cloud.
- Rich Debugging: Access video recordings, network logs, and screenshots of every test session.
đ ī¸ Configurationâ
To enable cloud execution, update your automation.properties file with the following parameters:
Common Settingsâ
# Set the platform (local, browserstack, saucelabs)
cloud.platform=browserstack
# Your cloud credentials
cloud.user=your_username
cloud.key=your_access_key
Web Executionâ
For web automation, you can specify the target environment:
execution.mode=web
browser=chromium
os=Windows
os.version=11
Mobile Executionâ
For mobile automation, the framework automatically maps these settings to Appium capabilities via CapabilityBuilder:
execution.mode=mobile
os=Android
os.version=13.0
mobile.device.name=Google Pixel 7
đŠī¸ Supported Providersâ
BrowserStackâ
When cloud.platform=browserstack is set, the framework uses the CapabilityBuilder to generate bstack:options. It supports both Playwright (remote connection) and Appium.
SauceLabsâ
When cloud.platform=saucelabs is set, the framework generates sauce:options and configures the remote URL to point to the SauceLabs grid.
đģ Executionâ
Simply run your standard Gradle test tasks. The framework detects the cloud configuration and establishes the remote connection automatically:
# Run web tests on the configured cloud platform
./gradlew webTest
# Run mobile tests on the configured cloud platform
./gradlew mobileTest
đ Debugging in the Cloudâ
Once a test finishes, you can log in to your provider's dashboard to see:
- Video Recording: A full video of the test execution.
- Metadata: Detailed information about the browser, OS, and environment.
- Logs: Appium logs, console logs, and network traffic.