🔧Maven- Project & Build Management Tool — Article #2

📂Create Project & Test With MAVEN

🔗Use Maven With Eclipse

Fareena Imran
CodixLab

--

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 👍

--

--

Fareena Imran
CodixLab
Writer for

SQA Engineer| Tech Writer | Write stories about SQA