Testify is a powerful Python-based automation framework designed for both web and mobile application testing. Leveraging Selenium for web automation and Appium for mobile testing, Testify is designed with flexibility, modularity, and ease of use in mind. It features a Page Object Model (POM) architecture, robust logging, and exception handling mechanisms, making it suitable for a wide range of testing scenarios.
- Overview
- Features
- Installation
- Usage
- Project Structure
- Logging and Reports
- Configuration
- Contributing
- License
Testify aims to streamline and automate testing for both web and mobile platforms, providing a scalable and configurable framework that can be integrated into any project. Whether you're performing functional tests on a web browser or running mobile tests on emulators or real devices, Testify’s unified structure enables you to manage all your tests in one place.
This framework is ideal for QA teams, developers, and automation engineers looking for a comprehensive and easy-to-extend test suite.
- Cross-Platform Support: Web automation using Selenium and mobile automation using Appium.
- Page Object Model (POM): Ensures modular and maintainable test scripts.
- Extensive Logging: Provides detailed logging with configurable verbosity levels.
- Robust Exception Handling: Graceful handling of test errors with informative messages.
- JSON-Based Configuration: Easily manage project settings and configurations.
- Parallel Execution: Run multiple tests concurrently to save time.
- Extensible: Supports adding new modules and extending test coverage with ease.
- Detailed Test Reports: Automatically generates reports after test execution.
To install and configure Testify, follow the steps below:
- Python 3.7 or later
- Selenium
- Appium (for mobile automation)
- WebDriver (ChromeDriver, GeckoDriver, etc.)
- Appium server and mobile device emulators (for mobile testing)
-
Clone the repository:
git clone https://github.com/Pirate-Emperor/testify.git cd testify -
Install dependencies:
pip install -r requirements.txt
-
Configure WebDriver & Appium:
Set up the WebDriver for your browser (e.g., ChromeDriver for Chrome) and ensure that the Appium server is running.
-
Run Web Tests:
Testify supports web testing using Selenium. To execute web tests, follow this command:
python -m unittest discover tests/web_tests
-
Run Mobile Tests:
For mobile automation using Appium:
python -m unittest discover tests/mobile_tests
-
Configuration Management:
Update your project configuration by editing the
config.jsonfile in the project root. This file includes all the settings for both web and mobile test environments. -
Logging and Reports:
Logs and reports are stored under the
logs/andreports/directories, respectively. After test execution, detailed HTML reports are generated for review.
The following structure highlights the main components of Testify:
testify/
├─ config/
│ ├─ __init__.py
│ └─ config.json
├─ pages/
│ ├─ mobile_pages/
│ │ ├─ __init__.py
│ │ └─ base_mobile_page.py
│ ├─ web_pages/
│ │ ├─ __init__.py
│ │ └─ base_web_page.py
│ ├─ __init__.py
│ └─ base_page.py
├─ tests/
│ └─ conftest.py
├─ utils/
│ ├─ __init__.py
│ ├─ config_parser.py
│ ├─ driver_setup.py
│ ├─ logging_config.py
│ ├─ mobile_driver_setup.py
│ └─ web_driver_setup.py
├─ LICENSE
└─ README.md-
Logging: Testify comes with detailed logging, capturing every action performed during the test execution. Logs are automatically saved in the
logs/directory with timestamps for easier debugging. -
Reports: After each test execution, an HTML report is generated in the
reports/directory, summarizing test results (pass, fail, error) along with screenshots of failures (if any).
Testify utilizes a JSON configuration file to manage different aspects of the test environment, making it easy to customize and adapt to various projects.
{
"web": {
"browser": "chrome",
"headless": false,
"timeout": 30
},
"mobile": {
"platformName": "Android",
"deviceName": "Pixel_3",
"app": "path/to/your/app.apk",
"automationName": "UiAutomator2"
},
"logging": {
"level": "INFO",
"file": "logs/testify.log"
}
}Contributions to Testify are welcome! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Make your changes.
- Submit a pull request.
This project is licensed under the Pirate-Emperor License. See the LICENSE file for details.
Pirate-Emperor
- GitHub: Pirate-Emperor
- Reddit: PirateKingRahul
- Twitter: PirateKingRahul
- Discord: PirateKingRahul
- LinkedIn: PirateKingRahul
- Skype: Join Skype
- Medium: PirateKingRahul