January 19, 2019

Selenium WebDriver Tutorial

January 19, 2019


What is Selenium?
Selenium is portable open source automation testing framework for web applications and web based tasks. It is licensed under Apache 2.0. This tutorial will help you understand Selenium and its related tools. We will guide you step by step.
Audience:
This tutorial will help both: Beginners and Professionals. We will move step by step to make it more easy for starters..
Pre-Requisite:
You must be familiar with basic programming concepts. Selenium offers different languages but in this tutorial, we will explore Selenium with JAVA so, refresh Java. J Happy Learning!

What we’ll be learning:
What’s Selenium all about?
a.     Introduction to Selenium
Selenium IDE
a.     Installation of Selenium IDE
b.    Record your first script using Selenium IDE
c.     IDE Locating Strategies
JAVA for Selenium (Basics)
b.    Data Types and Variables
c.     Control Flow Statements
d.    Arrays
e.     Exception Handling
f.      IO Operations and File Handling
g.     Classes and Methods
h.    Inheritance
i.      Polymorphism
j.      Abstraction
k.    Encapsulation
l.      Constructors, Data Type Conversions, etc
m.  Interfaces
Selenium Webdriver (Basic)
b.    Write your First Test Script Using Webdriver
c.     Gecko driver
d.    Execute program with different browsers
e.     Locating Strategies
f.      Handling Elements (drop down, radio button, checklist, text box, space, enter,mouse hover, pagination, etc)
g.     Handling Operation on Web Elements (Page, Button, Link, Edit Box, Text Box, Drop Down Box, List Box, Combo Box, Radio Button, Check Box, Web Table and Frame Etc)
Selenium Webdriver (Advanced)
a.     Handling Calendar Selection - working with date pickers
b.    Handling Autocomplete
c.     Handling Capturing screenshots
d.    Handling Cooking
e.     Handling Mouse Operations
f.      Handling read/write in excel files
Reporting
a.     Extent Reports
Selenium and Test NG, JUNIT
a.     Brief Introduction of TestNG – TestNG Annotations
b.    Installation of TestNG in Eclipse IDE – Selenium WebDriver Tutorial
c.     Introduction of TestNG framework – Advantages of TestNG over Junit framework
d.    Use of JUnit Annotations in Selenium WebDriver Automation Script
e.     Introduction to JUnit Annotations – Learn JUnit annotations used for your Selenium WebDriver automation
Advanced Webdriver
a.     How to handle cookies in Selenium Webdriver
b.    How to handle date Time Picker in Selenium Webdriver
c.     How to handle Screen shots in Selenium Webdriver
d.    How to read/write excel files in Selenium Webdriver
Selenium Interview Questions







How to Install Java in simplest way.

January 19, 2019
This tutorial will help you to install Java with Eclipse by following few simple steps:
1.      Install and configure Java
2.    Install Eclipse

Install and Configure Java

1.      Download JDK from here and install
2.    Configure JAVA Environment Variable
3.    Navigate to my PC> properties> Advanced System Settings > Environment Variables:

4.    Add New System Variable as in image :

5.     Now Navigate to PATH variable under system variables section and add: %JAVA_HOME% /bin; as in image :

6.    Navigate to Start >Run> cmd. it will open command prompt. Type:  Java –version.

7.     Now check path variable:  type command: Echo %PATH% 

Note:  It will display path, you can check your set path for java is displayed or not

JAVA installation and path variable setting is done successfully. Let’s move to Step 2

Install Eclipse


1.     Download Latest version of Eclipse from here.
2.    Install it
3.    Open and Provide work space
4.    Create New Project : File > New > JAVA Project


5.  Click Finish and Project will be created in Package Explorer.
6.  Right click on Src folder > New > Package. Provide name . it will add a package named: Test as in image.
     

7.  Right click on Package: test_Java > New > Class. it will show following:

8.  Provide class name and Click Finish.
9.  Write code and execute.

  

Eclipse installation with JAVA is done successfully.

Now we have setup JAVA using Eclipse, its environment is ready. we will explore basics of JAVA.  In next article, we will learn about: "Data Types and Variables"in JAVA.

January 07, 2019

Everything to Know About Automation Testing Frameworks

January 07, 2019

Testing framework is backbone of automation testing. They can reduce cost, increase re usability, speed, reduce effort and a lot other benefits for QA. Main purpose of this article is to explain frameworks, its uses and types of automation frameworks which are majorly used. It’s for QA who are new to automation testing.

What is a Framework?

Basically, framework is a set of rules, guidelines and/or standards that we need to follow to achieve a particular set of objectives in a formalized way. Basically, framework is a Skeleton that includes:
1.      Common practices
2.    Coding Standards
3.    Common Test Libraries
In common words, let’s take an example of Login.
Normal: Need to add steps to login in every case that required logged in user.
With Framework: Define Login function at 1 place and call where required.

Why we need a framework?

Framework plays a vital role. Necessity of framework arises when multiple developers are working on a project then it’s very necessary to have a common practice to follow for development of test scenarios. Otherwise, everyone will be following its own approach and that can cause a lot of problems like code re usability, maintainability, readability, duplication of code and much more.

Benefits of Using Framework

Using a framework will definitely results in low maintenance of scripts, re usability of tests, increase speed and efficacy in many ways. Following are some key benefits:
1.      Low maintenance cost
2.    Increase re usability of Code
3.    Increase in Speed
4.    Increase Test Efficacy
5.     Minimize Risk
6.    Test Automation Framework
Test automation framework is more like a system that has been defined specially to automate test scripts. As we already discussed, Framework is more like a Skeleton, a structure with enormous benefits that aid you to develop and execute test scripts efficiently. In this way, you can have a better reporting of test automation scripts.
Simply, it can be said that a framework is a combination various guidelines, coding standards, concepts, processes, practices, project hierarchies, modularity, reporting mechanism, test data injections etc. to pillar automation testing. Thus, user can follow these guidelines while automating application to take advantages of various productive results.
The advantages can be in different forms like ease of scripting, scalability, modularity, understand-ability, process definition, re-usability, cost, maintenance etc. Thus, to be able to grab these benefits, developers are advised to use one or more of the Test Automation Framework.

Types of Framework

1.      Module based Testing Framework
2.    Library Architecture Testing Framework
3.    Data Driven Testing Framework
4.    Behavior Driven Development Framework
5.     Hybrid Framework



Let’s have a brief overview of Frameworks.

Module based Testing Framework

Module based framework are based on OOPs concept- Abstraction. Whole application is divided into modules, each module contains individual test script. Each of them will be tested separately and then combined into a large test layer. As Abstraction is used so separation is done in such a way that any change in one module couldn’t affect other ones.

Reasons to Choose:

1- Easy to Maintain
2- While creating test script, less effort is required.
3- High level of modularization
4-In case of change, only respective test script is changed, rest of the code remains unchanged, which reduces effort.

Library Structure Testing Framework

This framework is based on module based approach but with some benefits. The key difference between the two is, instead of making modules, we make common functions that are expected to be used throughout the application e.g.: click, retrieve values from drop down, etc. In this case, application is broken down to achieve common objectives.

Reasons to Choose:

1-High re usability
2-Cost effective
3- Efficient

Data Driven Testing Framework

In This approach, data is placed separately from logic. In simple words, Logic resides in test script and data in Test Data. Both are kept separately and read using Excel, CSV, etc. files using variables. Test data contains all the inputs and expected data and using one driver, same test can be executed just by changing test data. Automation engineer can execute multiple test cases based on only one script.

 Reasons to Choose:

1- Time saving
2- Same test can be executed for different data sets
3- Increase Re usability
4- Less Maintenance Effort required
5- Increase flexibility

Keyword Driven Testing Framework

Keyword driven or table driven is basically an extension to data driven approach. In this approach, data can be places separately from logic. This is non-dependent framework that uses data tables and/or keywords which perform the function on application under test. Data can be placed in any external file that will contain some keywords

 Reasons to Choose:

1- Increase Re usability
2- Minimal code is required
3- Independent of testing tool
4- Faster execution 

Hybrid Testing Framework

As it name shows, hybrid means combination of any two frameworks. Every framework has some advantages and disadvantages so by merging any two, we can maximize advantages by minimizing weaknesses. Every application is different so as teams move to agile, automation testing becomes more crucial. Hybrid framework can be provide much better test results with proper efficacy.

Choosing a framework is very essential to automation testing. In order to provide effective test results, development and delivery, its’ very important to implement most reliable, effective and optimal framework.

I tried to cover most important areas. I hope you find it useful.Stay blessed J





January 01, 2019

Effective Communication Skills: It's a ladder to be a Leader

January 01, 2019


Communication is basically conveying your message to other party. Communication can be in any form: written or verbal and most importantly non- verbal.  Effective Communication skills plays an important role in our daily life activities but at workplace, it’s the essential skill to have. Mostly software engineers are introvert rather than extrovert but tester’s role demands to be an extrovert. Because you have to communicate within and across department. Testers communicate to BA /Client for requirements, to developers to communicate fault (written and verbal communication involved) and present reports to management regarding project / product quality. Where technical skills are important, so are soft skills. Soft skills are often ignored by technical professionals which somehow results in a flop. On the other hand, communicating effectively cane elevate your career graph from ordinary to stardom.

To acquire effective communication skills, one has to pay attention to following simple but effective points:

1-      Art of Listening:

Listening is most important skill but only a few people know how to listen properly. . Listening along technical skills is a rare combination. In order to have a prosperous career, one need to focus on listening.  In order to be a great communicator, one need to listen other’s carefully. According to research, when you listen to answer /reply back, you misinterpret. So always try to listen carefully without interrupting. Always try to listen to understand the problem or situation; not to bounce back.

2-      Speak with respect to Audience

Everyone loves to talk but what to talk is another major area to talk about. J Put focus on your listener, while speaking, you need to adjust your conversation w.r.t audience. In order to communicate to BA, you should know business and so with developers and management as well, this will make discussion more understandable and effective. As a speaker, always speak up confidently and slow down. As a tester, it will help to understand and argue better. 

3-      Keep it Simple and Clear

Whether its email, writing any FS / Test case document or speaking to customer/ stake holders, always have clear and simple message. Don’t beat about the bush, clearly summarize the problem and get straight to the point. If there are more than one problem, number these and explain with respect to priority. Speak/ Write with proper confidence, there should be no such words which denies or weaken your statement.  As a tester, you need to write many testing artifacts like test cases, test plans, Bug reports etc so you need to be able to write graciously.

4-      Be Diplomatic

Testers work in destructive way. You put focus to identify faulty or problem areas so mostly people doesn’t like it so you have to be very diplomatic with your words. You have to tell people the mistakes /problems without making them realize. This has to be done in every phase of SDLC whether its Impact Analysis Meeting or Defect Reporting.

5-      Be Specific and organized

Never ever write an email or attend a meeting without homework. If you go with blank mind, it will take time to settle with the situation. As a tester, you need to inquire about application, risks, plans, etc. You need to prioritize your Points with respect to situation. Tester should have the ability when to leave questions open- ended and when to go into deeper details. Sometimes, it’s really very risky not to ask the questions especially when you are having some management position where your decision an affect application or company directly. Always prioritize your points with respect to business stakeholder’s point of view. If something is important to business, that’s the most important, rest is just rest.

6-      Provide Information on Time

Information should be routed between BA, developers and testers. These teams should be synced. In case of any critical information, if information is not on time, it’s useless.  BA, developers and QA, these 3 should always be attached so that everyone has updated information. In case, QA doesn’t have updated information of Business that can directly affect quality of the product and same in vice versa.

7-      Make an Eye contact while listening /speaking

Making eye contact with your speaker or listener gives and impression that you are actively participating and understanding whatever is being explained. It gives a good sense of reliability. Good interaction with your client /end party helps you to understand them better.

December 31, 2018

Switching Testing Approach: Manual to Automation

December 31, 2018
Change is inevitable so instead of fighting with it, embrace it. This is an open truth that software manual testing alone can't cut it today's job market. No doubt, exploratory testing is also important, and testers have better analytical skills that many developers do not, but the fact remains that automation testing continues to rise. That's why gaining automation testing skills is a must in case you want to have a marketable career. Every software/services related organization focus on quality and in case they don't have any formal process. You can take an initiative. By using automation testing, you can reduce time and it will help your organization to serve qualitative products in minimal time. Here is step by step guide how to make transition from manual to automation testing in suitable manner:

1-    Convince Management the need of Automation

It doesn't matter how much any technique / tool or process is beneficial, you can't use it unless you take company's management and stakeholder in confidence. Automation tools are expensive as well as automation architects and engineers are. In order to see benefits of automation, you have to invest few months, it can't be seen immediately. So, in order to initiate automation track, you need to convince your management to bear the expenses and also make them aware that they have to be patient to see the benefits. 
How to convince?
Do cost- Benefit analysis to convince your management. In case, your company doesn't want to invest, no one can force them. But you can do following in order to prove your point:

1- Explain benefits of automation in detail.
2- Explain clearly that it’s expensive initially but over the period of time it pays off. Cost reduces automatically when once scripts are created. 
3- Convey your management that automation is a cost effective way to reduce work burden when regression testing is major focus. It reduces time by 50%.
4- Also explain that automation is not replacement of manual testing. There are many aspects for which manual testing is important. Automation is effectively used in Regression , Smoke etc but for new application or new release, manual is still considered as most effective approach.

2- Search Automation Tool according to project Requirement:

The most important part is to get the correct tool for automation. Most important points to focus while choosing tool are:
1-Tool must be in your Budget.
2-Tool must support technologies that are used in your application under test. For example, selenium web driver is for web applications and test complete for web application and so on.
3-You must have skilled resources in specific tool.

3. Find out Expert in respective tool to Hire or train your resources:

There is different policies for different organizations. Some companies hire skilled resources while others hire some train and train own resources but in case of automation expert, you need:
1- Experts/ architects to design framework.
2-Automation engineers to convert manual tests to automate.

4. Train the Resources:

Now the biggest and most crucial step is to train the team. If you are recruiting new skilled resources then train them on domain knowledge of the product /project under test. And in case of training own manual testers, provide them technical knowledge and expertise of using tool.

5- Analyze Application and identify Suitable areas for Automation Testing:

It’s not necessary that whole application should be automated at once. You can identify chunks and then automate one by one. In case to automate, you need to identify suitable areas depending on following factors:
1- Application should be stable. Means, it shouldn't be in development in early stages of development. 
2- At least, GUI of application should be stable.
3- There should be threshold set for ripple effects. If build is bug free in build X, it should be bug free in build X1 too.

By identifying such areas, we can automate manual test cases {that are already written} to automate so that these can be used in Regression easily. 

6- Create Automation testing Framework having execution plan and proper reporting

Critical task is to create a testing framework which can be useful for long term. Framework is nothing but just a set of rules and guides and built in functionalities that can be used to make the life easier of a tester. Framework is the main focus of automation testing. There are mainly 3 types of frameworks that are being used:
1- Data- Driven
2- Keyword Driven
3- Hybrid
Other than that modular and linear are also used. Automation frameworks is another topic, we will post on that topic soon. Execution Plan includes on which platforms automated tests will be run like: windows, UNIX, MAC, etc, which browsers will be covered or which not.

For detailed Information regarding Automation Frameworks, Read Article: "Everything to Know about Automation Testing Frameworks" .

Reporting

It is one of the key feature. Mostly tools provide own reporting but it can be customize too. By reporting you can have view which tests are executed in a specific build and what's the ratio of pass and fail. It can be used easily to show your work to management and client as well.

7- Write scripts

When Framework is designed, execution plan is ready, it’s time to write scripts. Scripts should be written in proper manner by following defined rules by framework. Naming conventions should be used. Source control like VSS or SVN should be used in order to control data loss.

8- Maintenance of Scripts

This is the most easy and most tough task at the same time. Maintenance will be handled when there are changes in the business or requirements ,or a new functionality is added so in such case, we need to change scripts too.  If framework is good, rules are being followed, source control is being used, it’s very easy to maintain the scripts .in other case, and it’s out of the question.

This article explains how we can switch from manual to automation testing in 8 simple steps. I tried to cover all aspects. Enjoy Reading!