đ§Maven- Project & Build Management Tool â Article #2
đCreate Project & Test With MAVEN
đUse Maven With Eclipse
In this article, we are going to learn about how to create a project in maven. So letâs get started đ
#1) Right-click on Package Explorer â New â Project. A âNew Projectâ wizard will open on the screen.
#2) Select Maven, expand this project â select Maven Project. Click on âNextâ.
#3) Click on âNextâ. A âNew Maven Projectâ wizard will open on the screen.
There are different templates provided by Maven, based upon your application development. You can select any one template then Maven will give you a hierarchy according to that template to manage your project.
But for all automation projects, we can use the âmaven-archetype-quickstartâ template.
#4) filter with âmaven-archetype-quickstartâ. Select the last on đ then click on ânextâ.
#5) Give any name to Group Id and Artifact Id. Click on âFinishâ.
It will take some seconds then you will see a folder in the âProject Explorerâ panel for the created project with the name you used for âArtifact Idâ.
The src/test/java folder contains all the automation tests we write and src/main/java contains all utility files that are needed for the framework. There is a file pom.xml that is the heart of the maven project that contains dependencies for the test automation framework.
Create a Test Case in the Test folder
#1) In src/test/java, there is a package with the name âcom.appium.ApiDemosâ. Right-click on the package â New â Class.
#2) Give any name to your test and click on âfinishâ.
You can use any name for your test but always but âTestâ word at the end of the test name like âLoginTestâ, âSignOutTestâ, etc.
You will see a class/ test in your src/test/java under the package.
We have done with creating a project and test case with maven đ
Any Question? Follow my articles to learn maven step by step. In the next article, we will learn about the Surefire plugin in MAVEN.
Best of Luck đ