Skip to content

This repo contains the basics of automation testing and java which will covered as a part of Automation Testing Online Training.

Notifications You must be signed in to change notification settings

YantraQA/tutorial-basics-of-automation-testing-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tutorial-automation-testing-java-basic


Description:

This repo contains the basics of automation testing and java which will covered as a part of Automation Testing Online Training.


Tutorials on:

  • Automation Testing Basics
  • Java Basics
  • Create Maven Project

Author:


Required Installations:


Ground Rules

  • Target to spend at least 20 hrs per week. Use tools like this to track: https://clockify.me/
  • Complete the Workshops and Assignments on time.
  • Present your learning in the form demos.
  • Do lot of self reading.
  • Pre-Reading of the Topic.
  • Learn Less, Do more.
  • Do not focus on how many topics you have learnt rather focus on the depth of what you are learning.

Tutorials - Slides - Automation Testing Basics, Java Basics, Create Maven Project

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image


2. Create your First Maven Project.


  • Read this to know basics of Maven: Click Here

  • Use below screen shots to create your first maven project.

Image

Image

  • Make sure you check "create a simple project(skip archetype selection)" . See below screen shot

Image

What is Artifact ID, Group ID and Version and what is the use?

  • GroupID + Artifact ID + version = Gives your project a uniq identity
  • Also called as signature of the your project
  • Group ID usually refers to your company and sub divisions
  • Artifact ID refers to your project name
  • For example, if you are working for a company lets say "infosys" and lets say you are working in a department whose name is "Center of Excellence or CoE". And assume your are automating an ecommerce application. Then group id and artifact id can be as below:
    • Group ID: com.infosys.coe
    • Artifact ID: ECommerceAutomationTestFW
    • Version: 3.1.3
  • Full signature of the project on "maven repo" will be: com.infosys.coe.ECommerceAutomationTestFW:3.1.3
  • You will then upload your project artifacts and compiled code on online maven repository ClickHere
  • This is important when some one else wants make use of your project.
  • They can simply refer to your project from online maven repository.
  • This is how we use Selenium, Junit, TestNG, Cucumber libraries in our project.

Image

Image

Image

  • Add properties tag in xml to include compiler version as 1.8

Image

  • Update the project after every POM.xml change.

Image

Image

Image

  • Create the package

Image

Image

Image

Image

Image

Image

  • You can run the project in two ways:
    • Using Run as "Java Application".
      • For this right click on the File which you want to run
    • Run as "Maven Project"
      • For this right click on the Project and go to maven and click on "maven test"

Image

  • Right click on the project (not file)

Image

Image


How to Import an existing Maven Project in Eclipse?

  • First make sure the project with the same signature is not already imported in eclipse, else it will throw an error

  • Click on File->Import

Image

  • Select Existing Maven project

Image

  • If the Project is already there in the eclipse with matching artifact id or group id, then pom check box will be greyed out and a message at the top will be displayed.
  • Try to delete the previous project if not required or change eclipse workspace, form File-Switch Workspace option

Image

  • Browse and go to the folder of the proect, select the Root folder of the POM.xml file.
  • Select the checkbox of pom.xml file

Image

How to create a New Maven Project Using Idea IntelliJ

  • Click on Create new Project

Image

  • Select Maven from Left Panel

Image

  • Enter Group name and artifact name/Project name

Image

  • Project Created

Image

  • Create Package and Class. Right click on the src/main/java pacakage and create your package and class

image

Create your First Program - Calculator

Click here for Code

Create your Second Program - Enhanced Calculator

Click here for Code

About

This repo contains the basics of automation testing and java which will covered as a part of Automation Testing Online Training.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages