You need to have:
- JDK 1.8
- Maven
- Set JAVA_HOME - MAVEN_HOME - ANDROID_HOME environment variables.
- Appium desktop
- TestNG plugin (if you want to run with TestNG)
- Cucumber for Java plugin (if you want to run with Cucumber)
- Android studio (to use Appium desktop and inspect the apk)
We have a BDD structure, so I recommend that see first the features file, then go step after step understand his behaviour.
mvn clean test
mvn clean test "-Dcucumber.filter=-t @Smoke"
mvn clean test "-Dcucumber.filter=-t @Login"
@Login @Contacts
mvn clean test -DforkCount=0
- Java jdk 1.8
- Maven
- Appium
- TestNG (runner)
- Cucumber (BDD)
The report, once we run the test, is located in target/cucumber-reports/index.html
- src/test/resources/features = features files with the scenarios, gherkin and data (BDD).
- src/test/resources/app = app available to test (apk only for now)
- src/test/java/**/Hooks = hooks in general of cucumber for this project (before and after)
- src/main/resources = cucumber options that are loaded from pom.xml file
- src/main/java/**/steps = steps that matches with gherkin from features files
- src/main/java/**/views = interactions with the views of the application
- src/main/java/**/core = different implementations:
- DriverService: manage the driver instance
- Browser package: Different browser implementations (their capabilities, driver class, etc) and BrowserType enum with the different types of browser
- PropertyManager: loads the properties (located in config.properties) and use them in the lifecycle
- Report package: implementation of the status report with a manager, and a service
This framework is a basic mobile automation project, with a lot o variables hardcoded, without profiles, properties, log, waits and basic report. A lot of things can be improved here.