pCloudy is a mobile app testing platform that gives you access to real Android and iOS devices directly from your browser. You can use those devices to run manual and automated tests, connect the platform to your CI pipeline, and validate builds on real devices.
This repository is a C# Appium sample that shows how to run mobile automation tests on the pCloudy Real Device Cloud using .NET 8 and NUnit. It includes separate Android and iOS project files, shared configuration helpers, and platform-specific test runners.
- .NET SDK 8.0 or later
- A pCloudy account
- A mobile app uploaded to pCloudy if you want to run against a real app
PC-appium-CSharp/
|-- Android/
| `-- AndroidPCloudy.csproj
|-- Ios/
| `-- IosPCloudy.csproj
|-- config/
| |-- AndroidPCloudySettings.cs
| |-- IIosPCloudySettings.cs
| |-- IosPCloudySettings.cs
| `-- PCloudyEnvironment.cs
|-- src/
| |-- PCloudyDriverFactory.cs
| `-- PCloudyIosDriverFactory.cs
|-- tests/
| |-- AndroidAppRunner.cs
| `-- IOSAppRunner.cs
|-- Run-FromConfig.ps1
`-- README.md
Set these before running the tests:
PCLOUDY_USERNAMEPCLOUDY_API_KEYPCLOUDY_CLOUD_URL- defaults tohttps://device.pcloudy.comPCLOUDY_APP_PATHPCLOUDY_DEVICE_NAMEPCLOUDY_DEVICE_MANUFACTURERPCLOUDY_PLATFORM_NAME- defaults toAndroidPCLOUDY_PLATFORM_VERSION
git clone https://github.com/Pcloudy-Sample/PC-appium-CSharp.git
cd PC-appium-CSharp
dotnet restoreIf you are running from PowerShell, you can set the environment variables for the current session like this:
$env:PCLOUDY_USERNAME="your-username"
$env:PCLOUDY_API_KEY="your-api-key"
$env:PCLOUDY_CLOUD_URL="https://device.pcloudy.com/appiumcloud/wd/hub"
$env:PCLOUDY_APP_PATH="pCloudyAppiumDemo.apk"
$env:PCLOUDY_DEVICE_NAME="your-device-name"
$env:PCLOUDY_DEVICE_MANUFACTURER="ONEPLUS"
$env:PCLOUDY_PLATFORM_NAME="Android"
$env:PCLOUDY_PLATFORM_VERSION="13.0.0"Single Android run:
dotnet test Android/AndroidPCloudy.csprojSingle iOS run:
dotnet test Ios/IosPCloudy.csprojYou can also use the helper script:
powershell -ExecutionPolicy Bypass -File Run-FromConfig.ps1 -Mode android-singlepowershell -ExecutionPolicy Bypass -File Run-FromConfig.ps1 -Mode ios-single$env:PCLOUDY_USERNAME="your-username"
$env:PCLOUDY_API_KEY="your-api-key"
$env:PCLOUDY_CLOUD_URL="https://device.pcloudy.com/appiumcloud/wd/hub"
$env:PCLOUDY_APP_PATH="pCloudyAppiumDemo.apk"
$env:PCLOUDY_DEVICE_NAME="your-device-name"
$env:PCLOUDY_DEVICE_MANUFACTURER="ONEPLUS"
$env:PCLOUDY_PLATFORM_NAME="Android"
$env:PCLOUDY_PLATFORM_VERSION="13.0.0"
dotnet test Android/AndroidPCloudy.csprojUse the iOS project path for iPhone or iPad runs:
dotnet test Ios/IosPCloudy.csproj- The sample is intentionally small and mirrors a starter project layout.
- You can extend it with additional test classes, page objects, and device-specific capabilities as needed.
- If you want to run against a real application, make sure
PCLOUDY_APP_PATHpoints to an uploaded app on pCloudy.
config/holds the platform settings and environment abstraction.src/contains the driver factories that create Appium sessions.tests/contains the NUnit runner classes for Android and iOS.Run-FromConfig.ps1is a small helper for launching the correctdotnet testcommand.
- Add more test methods in
tests/AndroidAppRunner.csandtests/IOSAppRunner.cs. - Centralize reusable Appium actions in helper classes under
src/. - Expand the
config/layer if you need device selection rules or more environment-driven behavior. - Add more
.csprojfiles if you want separate execution paths for additional platforms or variants.
If you need to adjust capabilities or add more platform-specific options, update the configuration classes in config/ and the driver factories in src/.
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.