Behaviour Driven Development Quick Overview

Before we install the necessary tools to automate our tests (test cases), we will look into the concept of various pieces that make automation testing possible. The foundation upon which automation lies is the Behavior Driven development popularly called BDD
So, what is Behavior Driven Development?
BDD is an agile software development technique
It that follows an outside-in approach to software development
Involves multiple stakeholders (Project manager, Developers, Business Analyst, Quality Assurance and any other stakeholder deemed necessary) – Stakeholders is the same set of terminology we make use of in a project. IT involves all the parties involved and that are likely to be impacted by the project
Focus is to obtain well defined behavior through interactions with stakeholders before writing code – In most cases it is stakeholders who determine the exact need
Easy to write test cases in natural language
Strictly adheres to the concept of building software only for the purpose for which it was intended upon(every piece of code has some business value for which it was built) . Business users with domain knowledge determine the requirement
Requirement the bulls eye can be easily hit via BDD
So,how do I start with BDD?
Cool tools like cucumber make this a fantastic experience
We do have some cool BDD frameworks
1) PHPSpec – PHP applications are supported
2) PySpec – For Python Applications. One good example is google
3) Rspec – For ruby applications
4) JBehave – This supports Java applications
5) xSpec,XBehave – Supported with .NET applications

Get QA Tutorials, Training For Free:

Delivered by FeedBurner

selenium webdriver interview question preparation

Selenium Web Driver is the latest open source project from Selenium. The other open source projects that came out of Selenium are Selenium IDE, Selenium RC, Selenium Grid.

Selenium Web Driver has the following features:

  • Simple API to automate web applications
  • Supports dynamic web pages
  • Uses browser built in support to do automation and does not needs javascript functions to drive the application (done by Selenium RC)

 

List of Drivers Selenium Web Driver Supports

  • Html Unit
  • Firefox
  • Internet Explorer
  • Chrome
  • Opera
  • iPhone

Android
What is selenium webdriver?
Selenium webdriver is a collection of language specific bindings. The language could be PHP,C#,Ruby on rails, java to name a few. These bindings help to drive a browser. This could be as simple as opening a webpage to automating the testing of a web page element
Is selenium web driver a new concept in selenium web testing?
No. Selenium Remote control popularly called selenium RC is the predecessor of selenium web driver
How to add selenium web driver to ruby environment?
This simple command will help in selenium web driver development in ruby environment
gem install selenium-webdriver
Which company makes use of python?
Google the worlds best search engine makes use of python framework. It is to be notes that selenium automation framework is brainchild of google employee
How to uninstall selenium package using pip?
pip eases the package uninstall process
pip uninstall selenium
How do I confirm if selenium is installed successfully in a pyhton environment?
pip utility from pyhtin has the capability to show list of libraries properly installed
pip freeze > out.txt — will output details of libraries installes to out.txt. Search for selenium in this library list and confirm
How do you make use of selenium web driver in perl and php environments?
Bindings are available from third party providers to make use of selenium in perl and php environments
What is web driver available for only windows OS?
Internet explorer driver controlled by simple .dll is windows OS specific web driver
What IE versions are supported with selenium web driver?
Internet explorer 6,7,8,9 are the supported versions. IE 8 is supported oon top of XP and IE9 is supported on top of windows 7
Will internet explorer driver work on linux?
Nope. IE driver will only work on windows
How do you access a simple webpage using selenium webdriver?
Here is how we access a simple web page in many different programming environments
Java environment
driver.get(“http://learnersreference.com”);
In case of c# try the following command
driver.Url=”http://learnersreference.com”;
In case of Ruby use
driver.get”http://learnersreference.com”;
In a python environment use
driver.get(“http://learnersreference.com”);
Say something on Selenium Implicit Waits Using implicit_wait function:-
Selenium web driver has implicit wait functionality that can be easily implemented using implicit_wait() function.Syntax is language specific and it is important to import Webdriver in first place.
Platform Supported By Selenium Web Driver/Selenium 2.0 :-
Here is a post that gives full details on platforms supported by selenium web driver

Browser

Version Supported

Firefox

10x, 9x, 8x, 7x, 6x, 5x, 4x, 3.6, 3

Internet Explorer

9x, 8x, 7x

Safari

3x, 2x

Opera

9x, 8x

Chrome

See the following link for chrome support https://code.google.com/p/selenium/wiki/ChromeDriver

Operating Systems: Windows, OS X, Linux, Solaris, Others
Programming Languages: C#, Java,Python, Ruby

List of Web Driver’s Drivers:
1. HtmlUnitDriver
2. Firefox Driver
3. Internet Explorer Driver
4. Chrome Driver (http:https://code.google.com/p/selenium/wiki/ChromeDriver )
5. Opera Driver ( http://code.google.com/p/selenium/wiki/OperaDriver)
It is interesting to note that selenium supports the hot and latest smart phone applications. Here are the driver details related to popular smart phones in the industry
6. iPhone Driver (http://code.google.com/p/selenium/wiki/IPhoneDriver)
7. Android Driver (http://code.google.com/p/selenium/wiki/AndroidDriver)
What is the reason behind java not recognised as internal or external command during Java Software Installation?
Whenever we want to use an automation tool like selenium the first step is to install software like java,PHP,ROR (Ruby on rails),.NET Framework (Visual studio), Python etc depending on application to be tested

In this example we start with installing java and check if the installation is complete and successful. although the validation is possible using web browser it is possible to get details from command line using simple command

java -version

The above command might return an error that says java not recognised as internal or external command. This can be fixed simply

Set the environment variables JAVA_HOME, PATH

In a windows environment JAVA_HOME=value, PATH=%PATH%;%JAVA_HOME% – Right click my computer->Advanced

In case of UNIX set JAVA_HOME

Get QA Tutorials, Training For Free:

Delivered by FeedBurner