Demo project that demonstrates how to test mobile devices in parallel using Appium and TestNG.
Make sure you have installed all the following prerequisites on your development machine:
OS | JDK | Maven | Node.js | Android Studio |
---|---|---|---|---|
Windows | scoop install java/openjdk |
scoop install maven |
winget install --id OpenJS.NodeJS.LTS |
winget install -e --id Google.AndroidStudio |
macOS | brew install openjdk |
brew install maven |
brew install node@22 |
brew install --cask android-studio |
- Install the appium server with a driver via npm:
npm install --global appium --drivers=uiautomator2
- Create and start the two virtual devices according to the guide: https://developer.android.com/studio/run/managing-avds
- Emulator 1
{
"platformName": "android",
"appium:platformVersion": "15",
"appium:automationName": "UIAutomator2",
"appium:udid": "emulator-5554",
"appium:systemPort": "8101"
}
- Emulator 2
{
"platformName": "android",
"appium:platformVersion": "14",
"appium:automationName": "UIAutomator2",
"appium:udid": "emulator-5556",
"appium:systemPort": "8102"
}
- Clone the repository.
git clone git@github.com:burakkaygusuz/appium-parallel-test-execution.git
- Start the appium servers using the related config files, respectively.
appium server --config .\src\test\resources\servers\appium_1.yml
appium server --config .\src\test\resources\servers\appium_2.yml
- Execute the yml file to install the Grid.
docker-compose -f docker-compose.yml up
- Run the test.
mvn clean test