Skip to main content

Maven integration for Eclipse + Creating simple maven project in eclipse

Note: In updated eclipse, maven is installed automatically. So, at first, try the "Finally" section at the bottom of this post.

maven is the build tool for web application automation testing.
It helps to get the dependencies we need, at the same time, build the project using a continuous Integration (CI) server. 
Use jenkins as CI server. 
Use cucumber
use java
Use Test Driven Development (TDD)

https://www.youtube.com/watch?v=8bZvevzeq-o&index=6&list=PLTgRMOcmRb3OHE_z8n9uCpROTaynNcv1u

  • Maven Eclipse plugin installation step by step:

  1. Open Eclipse IDE
  2. Click Help -> Install New Software...
  3. Click Add button at top right corner
  4. At pop up: fill up Name as "M2Eclipse" and Location as "http://download.eclipse.org/technology/m2e/releases"
  5. Now click OK
  • After that installation would be started.

# Another way to install Maven plug-in for Eclipse: (easiest one)
  1. Open Eclipse
  2. Go to Help -> Eclipse Marketplace
  3. Search by Maven
  4. Click "Install" button at "Maven Integration for Eclipse" section
  5. Follow the instruction step by step
# After successful installation do the followings in Eclipse:
  1. Go to Window --> Preferences
  2. Observe, Maven is enlisted at left panel
# Finally,
  1. Click on an existing project
  2. Select Configure -> Convert to Maven Project
# Creating a simple maven project in Eclipse:

http://toolsqa.com/java/maven/create-new-maven-project-eclipse/
http://www.tech-recipes.com/rx/39279/create-a-new-maven-project-in-eclipse/
https://wiki.jasig.org/display/UPM32/Creating+a+Simple+Maven+Project
http://www.vogella.com/tutorials/EclipseMaven/article.html
http://www.tutorialspoint.com/maven/maven_eclispe_ide.htm

Note: Test cases resides under the src > test > java > PackageName will only be considered as a test by Maven, rest will be ignored if you put you test cases in some other folder.

TestNG is the testing framework.

TestNG with Eclipse:
http://howtodoinjava.com/testng/testng-tutorial-with-eclipse/










Comments

Popular posts from this blog

Install and configure WSL2 (ubuntu distro), npm, git and project on Windows

  For Installation information please visit:  https://docs.microsoft.com/en-us/windows/wsl/install-win10 1.Configure WSL 2  After installation search for %UserProfile% in the local machine. check if there is any .wslconfig file. If there is no .wslconfig file create one with this content depends on the available resource. [wsl2] memory=8GB swap=0 processors=4 Install windows Terminal Application and check if everything is configured properly. 2.Configuring NodeJS on WSL npm install 3.Configuring Git and project  To install git, in a wsl terminal, we run sudo apt update && sudo apt upgrade   sudo apt install git To set up your Git config file, open a command line for the distribution you're working in and set your name with this command (replacing "Your Name" with your Git username): git config --global user.name "Your Name" Set your email with this command (replacing "youremail@ domain.com " wi...

Setting Environment Variables JAVA_HOME, MAVEN_HOME, PATH and CLASSPATH in Java for Windows

http://www.a2ztechguide.com/2011/10/setting-environment-variables-javahome.html https://docs.oracle.com/javase/tutorial/essential/environment/paths.html http://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7 Recommended: https://www.youtube.com/watch?v=2FWhn6xteU0&list=PLTgRMOcmRb3OHE_z8n9uCpROTaynNcv1u&index=3 JDK Download link: http://www.oracle.com/technetwork/java/javase/downloads/index.html Set under System variables>> JAVA_HOME C:\Program Files\Java\jdk1.8.0_102 Set under System variables>> JAVA_CLASSPATH .;C:\Program Files\Java\jdk1.8.0_102 Set PATH under User Variables of UserName: C:\Program Files\Java\jdk1.8.0_102\bin echo %JAVA_HOME% Output should be- C:\Program Files\Java\jdk1.8.0_102 echo %JAVA_CLASSPATH% Output should be- C:\Program Files\Java\jdk1.8.0_102 echo %PATH% Output should be- C:\Program Files\Java\jdk1.8.0_102\bin Setting up Maven: https://stackoverflow.com/questions/45119595/ho...