Video Tutorial -
Why Maven and Appium?
Appium is good tool for mobile automation. But, when using it for testing and building a test framework, it feels underpowered. Integrating Maven with Appium provides following benefits as, Apache Maven provides support for managing the full lifecycle of a test project.
1. Maven is mainly used for defining project structure, dependencies, build, and test management.
2. Using pom.xml(Maven) you can configure dependencies needed for building, executing and testing code.
3. Maven automatically downloads the necessary files from the repository while building the project.
1. Maven is mainly used for defining project structure, dependencies, build, and test management.
2. Using pom.xml(Maven) you can configure dependencies needed for building, executing and testing code.
3. Maven automatically downloads the necessary files from the repository while building the project.
How to Install Maven
1. Down Load latest version of Maven from THIS LINK.
2. Add an Environmental Variable MAVEN_HOME as shown below
3. Add Maven bin path in 'path' System Variable
Add caption |
4. Go to command prompt and run command 'mvn -version'
Add caption |
5.Check the results to ensure it is installed successfully
Create Maven Project in Eclipse -
1. Open Eclipse
2. Go to New -> Project ->
3. Select Simple Maven Project -> Next
4. Enter SampleTestProject in Group Id and Artifact Id -> Finish
5. Check the project structure and right click on JRE System Library and click on properties.
6. Select workspace default jre.
Install TestNG in Eclipse
1. Help -> Install New Software
2. Click on Add -> Enter TestNG and path http://beust.com/eclipse/ -> click OK
3. Select TestNG and click on Next
4. Again Click on NEXT
5. Click on Accept and Finish
6. Click on Ok for Security Warning dialog box and then installation will start
7. Then Restart your Eclipse
Add TestNG and Appium in Pom.xml
1. Open pom.xml
2. Copy below code within <Project> tag of Pom.xml
<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.46.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>io.appium</groupId> <artifactId>java-client</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.8</version> <scope>test</scope> </dependency> </dependencies>
Need code for how to handle Toast message and check whether wifi or mobile data is enabled or not in mobile device before launching Apk or mobile site.
ReplyDeleteAs Maven is also an testing framework then why are we using TestNG framework?(Is it just because of maven defines the project structure and TestNG as testing framework?)
ReplyDelete