This is sample framework for Android Test using Appium Cucumber and Java
- Make sure JDK 1.8+ is installed (make sure Java class path is set)
- Maven is installed (make sure .m2 class path is set)
- Install NodeJS and node version 10 or above
- Install Appium using NPM (npm install -g appium)
- Install Android SDK(Android Studio) and ANDROID_HOME and Path is set
- If you are using Emulator, Virtual Devices should be created and configured
- If you are using Real Android device it should be connected to PC and ADB debugging should be enabled on device.
- Import project in any IDE like Eclipse/Intellij
- These Mobile test will only run on Andoid Devices and Emulator
- These tests are only handling simple user login flow, If user ask for OTP during login flow that case is not handled in these tests.
- Add Product to Cart scenario is limited to the first page search results and will not consider any subsequent pages.
- Update amazon.user, amazon.password and amazon.productName in config.properties (src\test\resources\testData\config.properties)
- Download this repository to your local machine
- Using Command Line : Open Command Prompt and Navigate to folder AppiumJavaPOM folder and run command : mvn clean test, it will execute the tests and generate the reports in folder : target/telstraTestHTMLReport.
- Using Cucumber Runner Class : right click of TestRunner.java class and run as > Junit test.
- Using Features files : select AmazonLogin.feature feature file and right click select run as > cucumber feature file