This project is aimed at automating mobile application testing using Appium and TestNG. It includes test cases for the "com.wdiodemoapp" mobile app, covering login and signup functionalities.
Before running the tests, make sure you have the following prerequisites installed:
The project is structured as follows:
src/test/java
: Contains test classes for different test scenarios.src/test/resources
: Contains the mobile app APK file and any other test resources.
To run the tests, follow these steps:
-
Start your Android emulator(s) (e.g., Pixel7 and Pixel7-2).
-
Update the test configuration in the testng.xml file to match the device settings, including
deviceName
,platformVersion
,uuid
,appPackage
,appActivity
,portNumber
, andstrAppPath
. -
Execute the tests using the following command:
This command will execute the tests specified in the testng.xml file in parallel on the configured devices.
To run tests in parallel, we utilize TestNG's parallel execution feature. In the testng.xml file, you can configure multiple test suites, each targeting different devices, as shown below:
<suite name="Automator Test Suite" parallel="tests">
<listeners>
<listener class-name="org.automator.rakesh.TestListener"/>
</listeners>
<test name="Pixel7 Test" thread-count="4">
<!-- Configuration for Pixel7 -->
</test>
<test name="Pixel7-2 Test" thread-count="4">
<!-- Configuration for Pixel7-2 -->
</test>
</suite>