A Java-based mobile testing framework that combines Appium with OpenCV and Tesseract OCR for robust visual testing and text recognition in mobile applications.
- Automated mobile app testing using Appium
- Image processing and template matching with OpenCV
- Text recognition using Tesseract OCR
- Support for multiple languages including Hindi
- Configurable image preprocessing for better OCR accuracy
- Detailed logging and debugging capabilities
- Java JDK 18 or higher
- Maven
- Appium Server 2.0 or higher
- Android SDK (for Android testing)
- Tesseract OCR with language data
- OpenCV (installed via Maven dependency)
- Install Tesseract OCR:
brew install tesseract
- Install language data for Hindi:
brew install tesseract-lang
- Clone the repository:
git clone https://github.com/sawaii/custom-vision-testing.git
cd custom-vision-testing
- Install dependencies:
mvn clean install
- Update
src/test/resources/config.properties
with your Appium settings:
appium.server.url=http://127.0.0.1:4723
appium.device.name=your_device_name
appium.app.path=/path/to/your/app
appium.automation.name=UiAutomator2
appium.no.reset=true
appium.full.reset=false
appium.new.command.timeout=60
appium.auto.grant.permissions=true
Run tests using Maven:
mvn clean test
Run a specific test:
mvn clean test -Dtest=MobileVisionTest#testLanguageSelectionPage
src/main/java/com/vision/mobile/
- Core framework classesMobileVisionQuery.java
- Main class for image processing and OCR
src/test/java/com/vision/test/
- Test classesMobileVisionTest.java
- Example test implementation
src/test/resources/
- Test resources and configuration files
- Bilateral filtering for noise reduction
- CLAHE for contrast enhancement
- Custom sharpening kernel
- Otsu's thresholding
- Morphological operations
- Multi-language text recognition
- Region-based text extraction
- Multiple OCR attempts for accuracy
- Configurable preprocessing parameters
- Logo detection
- UI element verification
- Confidence threshold adjustment
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.