Welcome to the Mobile Test Automation Framework (MTAF) repository! This framework is designed to facilitate automated mobile testing for your projects, utilizing various technologies and design patterns. Below, you'll find information about the key components and technologies used in the framework.
MTAF is built with the following technologies and design patterns:
-
Page Object Model (POM) Design Pattern: MTAF follows the POM design pattern, which promotes the separation of test scripts and page-specific actions. This enhances maintainability and reusability by encapsulating the functionality of each page in dedicated Page Object classes.
-
Appium 2.x: Appium is utilized as a cross-platform mobile automation tool. With Appium 2.x, you can automate mobile applications on both Android and iOS platforms using a single codebase.
-
OpenJDK 11: MTAF is compatible with OpenJDK 11, ensuring that the framework can be used with a wide range of Java environments.
-
TestNG: TestNG is used as the testing framework. It offers powerful features for test management, parallel execution, and reporting, making it an ideal choice for organizing and running automated tests.
-
Maven: The project is managed using Maven, a popular build and dependency management tool. Maven simplifies project configuration, handles dependencies, and automates the build process.
-
UiAutomator2: UiAutomator2 is used for automating Android applications. It provides a robust API to interact with the user interface elements of Android apps, allowing for efficient test automation.
-
XCUITest: XCUITest is integrated for iOS application automation. This framework allows you to interact with and test iOS app interfaces effectively.
-
Extent Report: A Java-based reporting library often used for generating interactive and detailed reports in software testing. It's commonly used with test automation frameworks like Selenium or Appium.
-
Log4j: A widely used Java-based logging library that helps developers manage and output log messages in their applications.
-
Image Comparison-Occurrences Lookup : Performs images matching by template to find possible occurrence of the partial image in the full image
-
Appium Server: Programmatically startup the Appium server.
-
Android Emulator: Programmatically startup the emulator with the provided emulator name in properties file.
Follow these steps to get started with MTAF:
-
Clone the Repository: Clone this repository to your local machine using the following command:
git clone git@github.com:askhan-h/MTAF.git
-
Install Appium 2.x: Follow the below links to install appium 2.0 and other dependencies
-
Install Dependencies: Ensure you have OpenJDK 11 and Maven installed on your system. Install any additional dependencies mentioned in the
pom.xml
file using Maven. -
Configure TestNG: Modify the TestNG XML configuration file(s) to specify the tests you want to run, test suites, parallel execution settings, and more.
-
Implement Test Cases: Create test scripts using TestNG annotations in conjunction with the Page Object classes provided by the framework. Follow the POM design pattern to keep your test scripts organized and maintainable.
-
Install Image Driver plugin: You need to install the images plugin to compare images
-
Run Tests: Execute your tests using Maven or your preferred IDE. TestNG's reporting features will provide you with detailed test results.
The framework repository is organized as follows:
- src
- main
- resources
- apps
- Android
- iOS
- log4j2.properties
-test
-java
-android
-androidDeviceDetails.properties
-pageObjects
-testCases
-testsuites
-iOS
-iOSDeviceDetails.properties
-pageObjects
-testCases
-testsuites
-base
-appiumController
-AndroidAppiumFactory.java
-IOSAppiumFactory.java
-constants
-AndroidConstants.java
-IOSConstants.java
-pageBase
-AndroidPageBase
-IOSPageBase
-MainPageBase
-utils
-log4j
-logs.java
-testng
-AndroidTestngListners.java
-IOSTestngListners.java
-AppiumServer.java
-ExtentReporter.java
- pom.xml // Maven project configuration
- README.md // Framework documentation
- .gitignore
Happy testing with Mobile Test Automation Framework!