Friday, 7 August 2015

Installation of java and Selenium webdriver

Step 1 - Install Java on your computer

Download and install the Java Software Development Kit (JDK) here.

Next -


This JDK version comes bundled with Java Runtime Environment (JRE) so you do not need to download and install the JRE separately.

Step 2 - Install Eclipse IDE

Download "Eclipse IDE for Java Developershere. Be sure to choose correctly between Windows 32 Bit and 64 Bit versions.

You should be able to download a ZIP file named "eclipse-java-juno-SR1-win32-x86_64.zip" (the version number "SR1" may change over time).

Inside that ZIP file, there is an "eclipse" folder which contains all the application files. You can extract the "eclipse" folder anywhere you want in your PC; but for this tutorial, extract it to your C drive.

Unlike other popular software, no installation is required to use eclipse.

Step 3 - Download the Selenium Java Client Driver

You can download the Selenium Java Client Driver here. You will find client drivers for other languages there, but only choose the one for Java.

This download comes as a ZIP file named "selenium-2.25.0.zip". For simplicity, extract the contents of this ZIP file on your C drive so that you would have the directory "C:\selenium-2.25.0\". This directory contains all the JAR files that we would later import on Eclipse.

Step 4 - Configure Eclipse IDE with WebDriver

  1. Launch the "eclipse.exe" file inside the "eclipse" folder that we extracted in step 2. If you followed step 2 correctly, the executable should be located on C:\eclipse\eclipse.exe.
  2. When asked to select for a workspace, just accept the default location.

  1. Create a new project through File > New > Java Project. Name the project as "myproject".
  2. Right-click on the newly created project and select New > Package, and name that package as "mypackage".
  3. Create a new Java class under mypackage by right-clicking on it and then selecting New > Class, and then name it as "myclass". Your Eclipse IDE should look like the image below.

  1. Right-click on myproject and select Properties.
  2. On the Properties dialog, click on "Java Build Path".
  3. Click on the Libraries tab, and then click "Add External JARs.."
  4. Navigate to C:\selenium-2.25.0\ (or any other location where you saved the extracted contents of "selenium-2.25.0.zip" in step 3).
  5. Add all the JAR files inside and outside the "libs" folder. Your Properties dialog should now look similar to the image below.

  1. Finally, click OK and we are done importing Selenium libraries into our project.

Different Drivers

HTMLUnit and Firefox are two browsers that WebDriver can directly automate - meaning that no other separate component is needed to install or run while the test is being executed. For other browsers, a separate program is needed. That program is called as the Driver Server.
A driver server is different for each browser. For example, Internet Explorer has its own driver server which you cannot use on other browsers. Below is the list of driver servers and the corresponding browsers that use them.

Browser
Name of Driver Server
Remarks
HTMLUnit
(none)
WebDriver can drive HTMLUnit without the need of a driver server
Firefox
(none)
WebDriver can drive Firefox without the need of a driver server
Internet Explorer
Internet Explorer Driver Server
Available in 32 and 64-bit versions. Use the version that corresponds to the architecture of your IE
Chrome
ChromeDriver
Though its name is just "ChromeDriver", it is in fact a Driver Server, not just a driver. The current version can support versions higher than Chrome v.21
Opera
OperaDriver
Though its name is just "OperaDriver", it is in fact a Driver Server, not just a driver.
PhantomJS
GhostDriver
PhantomJS is another headless browser just like HTMLUnit.
Safari
SafariDriver
Though its name is just "SafariDriver", it is in fact a Driver Server, not just a driver.

You can download these driver servers here

Summary


Wednesday, 29 July 2015

Generic agile concept

Automation Testing for Agile Methodology.
 In the last few years, ever since the agile methodology came on board with its founders shouting and willing to do away with the mundane and laborious realities of the traditional waterfall model, the impact of the same can be also felt when it comes to automation testing. In the realm of the traditional process of software testing life cycle, automation testing is normally feasible when the application is stable, steady and the requirement is involving with a real considerable amount of time and in most cases involving a set of very skillful automation expert resources as well as a considerable amount of set-up costs. The basic purpose of automation testing is to reduce costs over long time and to ensure no new defects have been introduced as a result of existing test cases.
Automation testing by the very nature of the technology is not exploratory in nature since the main role of automation testing is saving time and reducing costs. Automation testing is not meant to come up with new and innovative defects. Automation testing aims at mostly conformation of the already existing.
Now by its very definition agile methodology talks about doing away with laborious and tedious documentation so that new and innovative ideas could be implemented and people could interact freely with each other so that more of these innovative and explorative ideas could be implemented.
Thus we could see a contradiction between the basic fundamental philosophies of agile methodologies and automation testing.
So we need to consider certain fundamental points here when it comes to evaluating the use of agile methodologies with respect to the automation testing methods and techniques. Thus we need to consider some fundamental points like time taken for design and coding, validation of the designed scripts with the existing test data and then adoption of the same for testing (whether the tests are of functional or regression purposes) So the real fact of all these events is that in order to perform all these facts, we need to ensure that a considerable amount of time is required for these tasks and in an agile environment where an average sprint takes an average 1-2 weeks to complete and thus it is obviously too difficult to contemplate affording so much time for automating scripts in such an way.
Another significant factor remains here that the type of changes in requirements which come into picture when agile methodology is at play. Agile methodology by it's own very definition is a sort of technique which is very helpful for responding to quick customer induced change requirements and which thus lends itself well to frequent changes during the overall development of the application.
In contrast automation testing is very useful when it comes to the more stable and less frequent types of requirements. Thus by definition automation testing does not lend itself well to various types of frequent changes in requirements which comes alongside the adoption of any agile methodologies.


What is Agile Testing?




Unlike the WaterFall method, Agile Testing can begin at the start of the project with continuous integration between development and testing. Agile Testing is not sequential (in the sense its executed only after coding phase) but continuous.
Agile team works as a single team towards a common objective of achieving Quality. Agile Testing has shorter time frames called iterations (say from 1 to 4 weeks). This methodology is also called release, or delivery driven approach since it gives a better prediction 


Scrum

SCRUM is an agile development method which concentrates specifically on how to manage tasks within a team based development environment. Basically, Scrum is derived from activity that occurs during a rugby match. Scrum believes in empowering the development team and advocates working in small teams (say- 7 to 9 members). It consists of three roles, and their responsibilities are explained as follows:
·         Scrum Master
o    Master is responsible for setting up the team, sprint meeting and removes obstacles to progress
·         Product owner
o    The Product Owner creates product backlog, prioritizes the backlog and is responsible for the delivery of the functionality at each iteration
·         Scrum Team
o    Team manages its own work and organizes the work to complete the sprint or cycle

Process flow of Scrum:

Process flow of scrum testing is as follows:
·         Each iteration of a scrum is known as Sprint
·         Product backlog is a list where all details are entered to get end product
·         During each Sprint, top items of Product backlog are selected and turned into Sprint backlog
·         Team works on the defined sprint backlog
·         Team checks for the daily work
·         At the end of the sprint, team delivers product functionality






Monday, 15 June 2015

About ATLC (Automation Test Life Cycle)

STLC is the SDLC part and ATLC (Automation Test life Cycle) is the Part of STLC

Test Automation Life Cycle - qainsights
1.       Automation Feasibility Analysis
Before kicking off implementing test automation, it is mandatory to analyse the feasibility of the application under test (AUT). Whether AUT is a right candidate or not for the test automation?
Also, feasibility analysis should be done on the manual test case pack which enables automation engineers to design the test scripts.
Apart from above feasibility, tool check can be done if your client insists to use their recommended tool selection.
Following are the feasibility check to be done to begin test automation:
  • AUT automation feasibility
  • Test Case automation feasibility
  • Tool feasibility
2.       Test Strategy
Test Strategy is the most critical phase in test automation. This phase defines how to approach and accomplish the mission. First and foremost in test strategy is selection of test automation framework.
Following are the types of test automation framework:
1.      Record and Playback Framework
2.      Functional Decomposition Framework
3.      Keyword/Table Driven Framework
4.      Data Driven Framework
5.      Hybrid Framework
6.      Business Process Framework
Most of the projects prefer Hybrid framework which is the combination of Keyword driven and Data driven framework. Because it has high reusability, more robust and pros when compared with other kinds of frameworks.
Other factors which involves in test strategy as follows
1.      Schedule
2.      Number of resources
3.      defining SLA
4.      Mode of communication process
5.      Defining in-scope and out-of-scope
6.      Return on Investment analysis
3.       Environment Set up
It is ideal to execute test automation scripts in regression environment. Test environment set up phase has following tasks:
1.      Sufficient tool licenses
2.      Sufficient add-ins licenses
3.      Sufficient utilities like comparison tools, advance text editors etc.
4.      Implementation of automation framework
5.      AUT access and valid credentials
4.       Test Script Development
This phase is the inception of implementing test automation. Activities of Automation test engineers as follows:
1.      Object Identification
2.      Creating Function Libraries
3.      Building the scripts
4.      Unit testing the scripts
5.      Warm-up test execution
 5.       Test Script Execution
Unit tested and signed-off Test scripts will be delivered to automation testing team for script execution. Following are the tasks involved with test script execution team.
1.      Test script execution
2.      Updating the execution or coverage tracker
3.      Defect Logging
 6.       Test Result Generation and Analysis
Result generation and analysis is the last phase and important deliverable in test automation. Results must be base lined and signed-off. Following are the important activities in this phase:
1.      Result analysis
2.      Report generation
3.      Documenting the issues and knowledge gained
4.      Preparation of client presentation




Wednesday, 10 June 2015

How to Install And Configure Web driver For Windows XP, 7 and 8

Step 1 - Install Java on your computer
Download and install the Java Software Development Kit (JDK) here.
http://cdn.guru99.com/images/install_java_1.png
Next -
http://cdn.guru99.com/images/install_java_2.png

This JDK version comes bundled with Java Runtime Environment (JRE) so you do not need to download and install the JRE separately.
Step 2 - Install Eclipse IDE
Download "Eclipse IDE for Java Developershere. Be sure to choose correctly between Windows 32 Bit and 64 Bit versions.
http://cdn.guru99.com/images/install_eclipse_1.png
You should be able to download a ZIP file named "eclipse-java-juno-SR1-win32-x86_64.zip" (the version number "SR1" may change over time).
http://cdn.guru99.com/images/install_eclipse_2.jpg
Inside that ZIP file, there is an "eclipse" folder which contains all the application files. You can extract the "eclipse" folder anywhere you want in your PC; but for this tutorial, extract it to your C drive.
http://cdn.guru99.com/images/install_eclipse_3.jpg
Unlike  other popular software , no installation is required to use eclipse.
Step 3 - Download the Selenium Java Client Driver
You can download the Selenium Java Client Driver here. You will find client drivers for other languages there, but only choose the one for Java.
http://cdn.guru99.com/images/download_java_client_driver_1.png
This download comes as a ZIP file named "selenium-2.25.0.zip". For simplicity, extract the contents of this ZIP file on your C drive so that you would have the directory "C:\selenium-2.25.0\". This directory contains all the JAR files that we would later import on Eclipse.
Step 4 - Configure Eclipse IDE with WebDriver
1.      Launch the "eclipse.exe" file inside the "eclipse" folder that we extracted in step 2. If you followed step 2 correctly, the executable should be located on C:\eclipse\eclipse.exe.
2.      When asked to select for a workspace, just accept the default location.
http://cdn.guru99.com/images/configure_eclipse_1b.png
3.      Create a new project through File > New > Java Project. Name the project as "myproject".
4.      Right-click on the newly created project and select New > Package, and name that package as "mypackage".
5.      Create a new Java class under mypackage by right-clicking on it and then selecting New > Class, and then name it as "myclass". Your Eclipse IDE should look like the image below.
http://cdn.guru99.com/images/configure_eclipse_2.png
6.      Right-click on myproject and select Properties.
7.      On the Properties dialog, click on "Java Build Path".
8.      Click on the Libraries tab, and then click "Add External JARs.."
9.      Navigate to C:\selenium-2.25.0\ (or any other location where you saved the extracted contents of "selenium-2.25.0.zip" in step 3).
10. Add all the JAR files inside and outside the "libs" folder. Your Properties dialog should now look similar to the image below.
http://cdn.guru99.com/images/configure_eclipse_3.png
11. Finally, click OK and we are done importing Selenium libraries into our project.
Different Drivers
HTMLUnit and Firefox are two browsers that WebDriver can directly automate - meaning that no other separate component is needed to install or run while the test is being executed. For other browsers, a separate program is needed. That program is called as the Driver Server.
A driver server is different for each browser. For example, Internet Explorer has its own driver server which you cannot use on other browsers. Below is the list of driver servers and the corresponding browsers that use them.

Browser
Name of Driver Server
Remarks
HTMLUnit
(none)
WebDriver can drive HTMLUnit without the need of a driver server
Firefox
(none)
WebDriver can drive Firefox without the need of a driver server
Internet Explorer
Internet Explorer Driver Server
Available in 32 and 64-bit versions. Use the version that corresponds to the architecture of your IE
Chrome
ChromeDriver
Though its name is just "ChromeDriver", it is in fact a Driver Server, not just a driver. The current version can support versions higher than Chrome v.21
Opera
OperaDriver
Though its name is just "OperaDriver", it is in fact a Driver Server, not just a driver.
PhantomJS
GhostDriver
PhantomJS is another headless browser just like HTMLUnit.
Safari
SafariDriver
Though its name is just "SafariDriver", it is in fact a Driver Server, not just a driver.

You can download these driver servers here
Summary
·         Aside from a browser, you will need the following to start using WebDriver
·         Java Development Kit (JDK). http://www.oracle.com/technetwork/java/javase/downloads/index.html
·         Eclipse IDE - http://www.eclipse.org/downloads/
·         Java Client Driver - http://seleniumhq.org/download/
·         When starting a WebDriver project in Eclipse, do not forget to import the Java Client Driver files onto your project. These files will constitute your Selenium Library.
·         HTMLUnit and Firefox are the only browsers that you can automate without the use of a Driver Server.
·         Each other browser has its own driver server.