Start Coding

Automation Check : 

“The Test script that helps to check the application as per the instructions provided by the tester(s)/Programmer.  It is helpful in getting a quick result or to perform a continuous regression check and also to focus more on Test coverage.”

Why Automation:

It is more important that any change in the piece of code should not impact the existing functionality of the product. To achieve that, testing will be carried out in many phases. But, to give quick feedback about the changes,  Manual Test effort might take some more time than a machine doing the same work. 

Automation Check is not a Test:

Automation check can’t be called out as a Test. Because, it can only follow and perform the action based on the instruction given to it. It’s similar to a Manual Tester picking up the test case written by someone and executing it where he/she don't need to know much about the Product, Platform, Domain, Testing skills.

I want to Automate the app:  

The question comes to the beginner's mind on how to start. There might be a confusion on selecting the IDE, Language and Design pattern. In order to help here, I will be sharing the Configuration set up details which are the fundamentals to start automation. 

There are multiple languages, IDE, Design Patterns. Here I will be explaining about

  • IDE: IntelliJ or Eclipse
  • Language: JAVA
  • Design Pattern : POM and BDD
  • Framework: TestNG
  • Build tools : Maven

We will learn about the Design pattern, Framework and Build tools in detail in my upcoming blog post.

Configuration on Mac OSX

  1. Download and Install Java JDK:https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
  2. Set the path in bash_profile: 

Open Bash_profile using the following command.

  • Start the Terminal
  • Type cd ~/ to go to your home folder
  • Type touch .bash_profile to create your new file.
  • Add Java_Home path in the file. 

Type “which Java” in the terminal to confirm the JAVA is installed in the machine.

3. Download and install IntelliJ IDE : https://www.jetbrains.com/idea/ 

4 Download Browser drivers and save it in some folder in your system.

And We are almost done with the set up. 

Once IntelliJ IDE is installed,  

  1. Open IDE 
  2. Click on Create New Project
No alt text provided for this image

3. Select Maven

No alt text provided for this image

4. Once after archetype is loaded choose Next

5. Give the name of project and Location where it needs to be saved

No alt text provided for this image

6.Click on Finish.

7.Now expand the project shown at the top left of the screen.

8. Go to pom.xml file

No alt text provided for this image

9. Add Dependencies( Jar files needed for Automating the app)

To get the Jar dependencies go to the maven repository webpage.

https://mvnrepository.com/

Search for selenium java

  1. Select the latest version (not the alpha version)
  2. Choose the Maven tab and Copy the XML lines.
  3. And paste it in a pom.XML file. Put those lines under 
  4. <dependencies> </ dependencies > tag.

Search for TestNG

  1. Select the latest version (not the alpha version)
  2. Choose the Maven tab and Copy the XML lines.
  3. And paste it in a pom.XML file. Put those lines under 
  4. <dependencies> </ dependencies > tag.

After it’s imported . right click on the Project and find an option “Convert  Project to TestNg Project” once chosen, TestNg.xml file will be created in the project folder structure.

We are done!!!. 

Start writing the first script

Now go to src-> test ->java -> right click and select class-> name the class and enter

No alt text provided for this image

A class file will be created. We are done with the configurations for Automating Web applications. To start writing a script, we will be needing some information to make the system understand the instructions and perform the actions to it.

We will learn about Locators in my Next blog post.



To view or add a comment, sign in

More articles by Pradeep Lingan

  • Selenium Commands- Part-1

    So far we have seen how to launch the app from browsers through Test scripts. Now let's look into some Selenium…

  • Automate apps through Web Browsers

    We have seen the configurations and locators in my last blog posts. Let's look on how to launch the Chrome/Firefox…

  • Locator Objects

    When we want to Automate the web applications, we need to identify the HTML elements and perform some actions on it. To…

Others also viewed

Explore content categories