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
- Download and Install Java JDK:https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
- 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,
- Open IDE
- Click on Create New Project
3. Select Maven
4. Once after archetype is loaded choose Next
5. Give the name of project and Location where it needs to be saved
6.Click on Finish.
7.Now expand the project shown at the top left of the screen.
8. Go to pom.xml file
9. Add Dependencies( Jar files needed for Automating the app)
To get the Jar dependencies go to the maven repository webpage.
Search for selenium java
- Select the latest version (not the alpha version)
- Choose the Maven tab and Copy the XML lines.
- And paste it in a pom.XML file. Put those lines under
- <dependencies> </ dependencies > tag.
Search for TestNG
- Select the latest version (not the alpha version)
- Choose the Maven tab and Copy the XML lines.
- And paste it in a pom.XML file. Put those lines under
- <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
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.