pCloudy is a mobile app testing platform that gives you single-click access to real Android and iOS devices directly from your browser. Use these real devices to perform manual and automated testing for your app, and integrate the platform with your CI pipeline for continuous testing across multiple real devices with every build.
pCloudy is fully integrated with Appium, letting you run your existing Appium test scripts against real devices on the pCloudy cloud with minimal changes.
This project is a plain Java + Maven Appium sample showing how to run Java Appium tests on the pCloudy Real Device Cloud with TestNG suite profiles for single-device and parallel execution.
- Java 8 or higher
- Maven
- A pCloudy account with your registered email and API key
- Your app (
.apk/.ipa) uploaded to your pCloudy Cloud Drive
git clone https://github.com/Pcloudy-Sample/PC-appium-java-testng
cd PC-appium-java-testng
mvn clean packageThis sample currently uses the pCloudy credentials and hub URL configured in AndroidAppRunner.java and IOSAppRunner.java.
If you prefer environment-based configuration, update the code to read from environment variables or edit the hardcoded values directly.
macOS / Linux:
export PCLOUDY_USERNAME="YOUR_EMAIL_ID"
export PCLOUDY_APIKEY="YOUR_API_KEY"Windows:
set PCLOUDY_USERNAME=YOUR_EMAIL_ID
set PCLOUDY_APIKEY=YOUR_API_KEYEach platform has its own runner class and TestNG suite profiles.
Android single run:
mvn clean test -P android-singleAndroid parallel run:
mvn clean test -P android-parallelFor iOS:
mvn clean test -P ios-singlemvn clean test -P ios-parallelYou can also open AndroidAppRunner.java / IOSAppRunner.java and hardcode values directly if needed.
The pCloudy_ApplicationName capability must match the name of the app already uploaded to your pCloudy Cloud Drive.
| Capability | Description |
|---|---|
pCloudy_Username |
Your pCloudy account email ID |
pCloudy_ApiKey |
Your pCloudy API key |
pCloudy_ApplicationName |
Name of the app already uploaded to your pCloudy Cloud Drive |
pCloudy_DurationInMinutes |
Booking duration for the device session |
pCloudy_DeviceManufacturer |
(Android) Device manufacturer to run the test on, e.g. Samsung |
pCloudy_DevicePlatformVersion |
(Android) OS version of the target device |
pCloudy_DeviceFullName |
Book a specific device by its full name, e.g. SAMSUNG_GalaxyA10s_Android_11.0.0_99cde |
automationName |
Appium automation engine — uiautomator2 (Android) or XCUITest (iOS) |
appPackage / appActivity |
(Android) Package and launch activity of the app under test |
bundleId |
(iOS) Bundle identifier of the app under test |
Note:
pCloudy_DeviceFullNamealone is enough to book a specific device. When it is set,pCloudy_DeviceManufacturerandpCloudy_DevicePlatformVersionare not required. UsepCloudy_DeviceManufacturer/pCloudy_DevicePlatformVersioninstead only if you want pCloudy to select any available device matching that manufacturer/version rather than one specific device. ``
Test results are visible on your pCloudy dashboard once the session starts.
Each step in AndroidAppRunner.java (and in IOSAppRunner.java once you add your own steps) calls captureScreenShots(), which saves a timestamped screenshot into a local screenshot/ folder after every action.
PC-appium-java-testng/
├── pom.xml
├── README.md
└── src
├── main
│ └── java
│ ├── AndroidAppRunner.java
│ └── IOSAppRunner.java
└── test
└── java
├── android-single.xml
├── android-parallel.xml
├── ios-single.xml
└── ios-parallel.xml
- Add new test methods to
AndroidAppRunner.javaandIOSAppRunner.javafor additional app workflows. - Store shared utility methods in a common helper class if you reuse steps across both Android and iOS.
- Add more TestNG suite XML files under
src/test/javato support different device combinations or test groups. - Update the
pom.xmlwith custom profiles or reporting plugins as your CI workflow evolves.
For the full pCloudy REST API reference (device booking, app upload, reports, and more), see:
Contributions are welcome. Please open an issue to discuss your idea before submitting a pull request.