div.menu4 { /*width:500px;margin:0 auto;*//*Uncomment this line to make the menu center-aligned.*/ text-align:center; font-size:0; height: 25px; *position:relative;*top:1px;/*Hacks for IE6 & IE7 */ } div.menu4 a { display: inline-block; margin-right:6px; /* It specifies the distance between each tab */ background:#FFF url(bg.gif) repeat-x 0 0; padding-left:4px; vertical-align:top;/*ChangeSet#1*/ text-decoration:none; } div.menu4 a span { display: inline-block; background:#FFF url(bg.gif) repeat-x 100% 0; padding: 0 20px; text-decoration:none; font: normal 12px Arial; line-height: 25px; color:#7087A9; vertical-align:top; } div.menu4 a:hover, div.menu4 a.current { background:#FFF url(bg.gif) repeat-x 0 -25px; line-height: 26px; } div.menu4 a:hover span, div.menu4 a.current span { background:#FFF url(bg.gif) repeat-x 100% -25px; line-height: 26px; color:#244D8A; } div.menu4sub { height:8px; border:1px solid #C2D5EF; background:#eee url(bg.gif) repeat-x 0 -50px; }

Thursday 25 February 2016

Introduction to Selenium

What  is Selenium?

Selenium is a free (opensource) automated testing package for internet applications across different browsers and platforms. It's very much like HP Quick Test Professional (QTP) just that Selenium targets automating internet-based programs.
Selenium isn't only a program that is single however a package of applications's, each catering to various testing requirements of a business. It h-AS four parts.
Selenium Integrated Development Environment (IDE)
Selenium Remote-Control (RC)
WebDriver
Selenium Grid


Right now, WebDriver and Selenium RC are unified into one framework to to make Selenium 2. Selenium 1, incidentally, refers to Selenium RC.

Who created Selenium?

Since Selenium is an assortment of tools that are distinct, it'd distinct programmers at the same time. Here are the key individuals who made noteworthy contributions to the Selenium Job
Mostly, Jason Huggins in 2004 created Selenium. A technologist at ThoughtWorks, he was operating on a web program that needed regular testing. 

Having recognized the repetitious testing of the application was becoming less and more efficient, he developed a Java Script software which will automatically handle the activities of the browser. He named this software as the "JavaScriptTestRunner."
Seeing potential in this notion to simply help internet apps that were other, JavaScriptRunner was created by him opensource which was afterwards renamed as Selenium Center.


Brief Introduction Selenium IDE

Selenium Integrated Development Environment (IDE) is the simplest framework in the Selenium package and is the easiest one to understand. 

This is a Firefox plugin that you could install as readily as you can with other plugins. But due to the simplicity, Selenium IDE should exclusively be utilized as a prototyping device. 

In the event you would like to create test cases that are more complex, you'll need to make use of either WebDriver or Selenium RC.

Short Introduction Selenium Remote-Control (Selenium RC)

Selenium RC was the main testing framework of the entire Selenium job to get quite a long time. 

Here is the primary web testing tool that enabled users to make use of a programming language they favor. As of variation 2.25.0, Remote Control can support the following programming languages:
Java

C#
PHP
Python
Perl
Ruby



Brief Introduction WebDriver


The WebDriver proves it self to be better than equally Selenium RC and Selenium IDE in many facets. It executes a secure and newer strategy in automating the activities of the browser. 
WebDriver, unlike Selenium RC, doesn't rely on Java Script for automation. By right conveying to it, it controls the browser.
The languages that are supported will be just like those in Selenium RC.
Java

C#
PHP
Python
Perl
Ruby


Selenium Grid


Selenium Grid is an instrument used jointly with Selenium RC to all run evaluations that are concurrent in once all across various browsers and different devices. Concurrent execution signifies working several tests simultaneously.

Attributes:

Empowers simultaneous running of evaluations in surroundings and several browsers.
Conserves time tremendously.
Uses the hub-and-nodes theory. The hub functions as a principal supply of Selenium commands to every node attached to to it.
The best way to Select the Best Selenium Tool For Your Own Need

Selenium IDE

-- To understand theories on Selenium and automatic screening, such as:
Commands such as sort, open up, clickAndWait, maintain, confirm, etc.
-- Locators etc., for example id, title, xpath selector
-- Running customized Java Script code using runScript
-- Exporting test cases in a variety of formats.
-- To create evaluations with minimum knowledge in programing.
-- To create test suites and straightforward test cases you can export after to WebDriver or Remote Control.
-- To examine a web application towards Firefox just.

Selenium RC

-- To design a test utilizing a much more expressive language than Selenese
-- To run your evaluation against different browsers (other than HtmlUnit) on different systems.
-- To deploy your evaluations across several environments utilizing Selenium Grid.
-- To test your program against a fresh browser that supports Java Script.
-- To examine web applications with sophisticated AJAX-based situations.

WebDriver

-- To make use of a programming language that is specific in creating your test suit.
-- To examine programs which are rich in AJAX-based functionalities.
-- To run evaluations to the HtmlUnit web browser.
-- To create custom-made evaluation results.

Selenium Grid

-- To run your Selenium RC scripts in several browsers and OS concurrently.
-- To run a test suite that is huge, that require to not finish impossible.

A Comparison between QTP and Selenium

Quick Test Professional(QTP) is a proprietary automatic screening device formerly possessed by the organization Mercury Interactive before it had been acquired by Hp in 2006. The Selenium Instrument Suite has several benefits over QTP (as of version 1 1) as detailed below -

Selenium
QTP
Open source, free to use, and free of charge.
Commercial.
Highly extensible
Limited add-ons
Can run tests across different browsers
Can only run tests in Firefox , Internet Explorerand Chrome
Supports various operating systems
Can only be used in Windows
Supports mobile devices
Supports mobile device using 3rd party software
Can execute tests while the browser is minimized
Needs to have the application under test to be visible on the desktop
Can execute tests in parallel.
Can only execute in parallel but using Quality Center which is again a paid product.

Advantages of QTP over Selenium


QTP
Selenium
Can test both web and desktop applications
Can only test web applications
Comes with a built-in object repository
Has no built-in object repository
Automates faster than Seleniumbecause it is a fully featured IDE.
Automates at a slower rate because it does not have a native IDE and only third party IDE can be used for development
Data-driven testing is easier to perform because it has built-in global and local data tables.
Data-driven testing is more cumbersome since you have to rely on the programming language's capabilities for setting values for your test data
Can access controls within the browser(such as the Favorites bar, Address bar, Back and Forward buttons, etc.)
Cannot access elements outside of the web application under test
Provides professional customer support
No official user support is being offered.
Has native capability to export test datainto external formats
Has no native capability to export runtime data onto external formats
Parameterization Support is in built
Parameterization can be done via programming but is difficult to implement.
Test Reports are generated automatically
No native support to generate test /bug reports.

Summary:

The complete Selenium Tutorial Instrument Suite is comprised of four parts:
Selenium IDE, a Firefox add on you could just use in creating comparatively straightforward test cases and test suites.
Selenium Remote-Control, also called Selenium 1, which will be the initial Selenium tool that enabled users in making sophisticated evaluations to make use of programming languages.
The more recent breakthrough which allows your test scripts to speak straight to the browser, WebDriver, thus controlling it from the os-level.
Selenium Gridis also a device which is used with Selenium RC to run evaluations that are concurrent across OS and different browsers.
WebDriver and selenium RC was united to to create Selenium 2.
Selenium is less disadvantageous than QTP in relation to flexibility and prices. In addition, it allows tests to run in parallel, unlike in QTP where you're simply permitted to to operate tests sequentially.


Selenium WebDriver

Selenium WebDriver


  • Selenium WebDriver Is opensource software testing program which supports a variety of browsers. 
  • It's additionally supporting many different applications programming languages like PHP, Python, Ruby, C#, Java and Perl so you can make your test cases utilizing your favorite language. 
  • Most well-known language, present days Is Java to ready your your pc software program automation test instances with selenium webdriver.
  • Different posts have been written by me with java on a variety of subjects for selenium webdriver. Holler hyperlinks that are given will take you to Selenium webdriver tutorials hyperlinks webpages. 
  • I attempted to describe every and each point with in-depth description on selenium webdriver. Begin learning selenium webdriver from Component 1. 
  • These selenium webdriver tutorials takes one to advanced degree quite readily and will prepare one to confront any Interview, Prepare one to generate test cases for the software internet programs, Prepare you to make your own personal framework. 
  • Begin your selenium webdriver Training learning trip be grasp and now to understand applications automation testing In selenium webdriver within few months by attending Selenium webdriver Tutorials.


Learn Selenium Webdriver Online Free Step-By Step:


  • For those who have fundamental knowledge of anyone Webdriver supported computer software development language like Java, selenium Webdriver learning for software testing isn't a huge job.
  •  In the event that you've learnt Selenium IDE applications testing program before learning selenium Webdriver software testing program, it's extra edge for you. Afterward I will be proposing you to first Understand Selenium IDE 
  • From This Site after which begin holler given Webdriver studying tutorials step-by step for applications automation testing in the event you are completely new with selenium. You will be helped by knowledge of selenium IDE in studying Webdriver really quickly.


Selenium WebDriver Tutorials - Essential Actions Operations And Commands With Examples:


  • I've already posted Selenium WebDrier Tutorials posts Operate first evaluation with webdriver, the best way to configure junit with eclipse to create webdriver evaluation report and how to setup internet driver with eclipse.
  • We've got additionally learn different ways of finding components of applications web program in webdriver.Every one of these specific things are very fundamental things and you also should find out them all before beginning your test case development in selenium2. 
  • Now we're able to understand next step of executing fundamental activities with java for the applications web application in net driver.
  • Create Datadriven Frame Work For Selenium WebDriver Using TestNG POI And ANT.
  • If you desires to create selenium webdriver data driven framework from-scratch and are using selenium webdriver as automation device to check applications web application then follow bellow measures that are provided. 
  • It is going to direct the best way to make data pushed framework in selenium webdriver step by stage to try applications web application.
  • Distinct frameworks are being used by folks like key word driven framework, data-driven hybrid framework framework and POM to analyze applications web application with selenium webdriver. 
  • Which framework to make use of is depends you applications web application kind. If you're analyzing applications web application where demand to make use of quite big information in automation evaluation procedure you then can certainly use hybrid framework or data-driven.


Selenium WebDriver Interview Questions with responses:


  • I believe all those people who are Interested to to wait WebDriver Interview with customer or business has to bear in mind about degree Interview questions that are fundamental and advanced using their responses that are right.
  •  I've created often requested webdriver/selenium 2 software testing Interview questions with in-depth and right responses. 
  • It isn't only for Interview goal but your WebDriver knowledge may enhance also to perform automation testing on applications web application.
  • See Selenium WebDriver Tutorials Learn page to discover all links of webdriver/selenium 2 tutorials to analyze applications.
  • As you understand, Use of webdriver/Selenium 2 software testing tool Is Rising day by day and now several businesses are using for automating their software testing procedure, Selenium WebDriver. 
  • As per the use Increase rise of selenium WebDriver, I will say WebDriver will be fundamental part of software testing Sector. 
  • Many businesses hiring regular to WebDriver professionals so now It's Important for every one of us to understand webdriver quite closely.


Selenium Tricks And WebDriver Tips:


  • There are times that you have to take activities that are catchy on applications web program page. Selenium webdriver software testing program tend not to have some direct approach to perform such activities that are catchy. 
  • For this reason, you should make use of some methods in your Selenium webdriver test script to execute some activities on applications web program page.
  • Holler links that are given will reveal to you a few tricks using which it is possible to perform complicated activities In selenium webdriver evaluations quite readily.


OOP Theories And Innovative Java Tutorials For WebDriver:

  • Before we learnt the OOP notions tutorials that are necessary to move Interviews and Begin WebDriver software testing program learning procedure on First amounts of many distinct basic java computer software development language. 
  • Now let us make an effort to comprehend some of the high level java and complex Java OOP concepts tutorials which can help you during WebDriver framework development for the applications web application.
  • It will enable you to attend an Interview In Case you've 2 years experience In software testing software that is WebDriver.

Learn Selenium Testing

Selenium Vs HP LeanFT

Selenium has a dedicated user base with regularly increasing adoption in the previous couple of years, and has carved a niche in the software testing tools world. 
  • Endorsement in businesses today have raised also, while this tool was always favored by Open Source enthusiasts since the RC times. 
  • In the past year or two, rather a few Fortune 500 firms and banks have diversified their skill- tool and base portfolio with Selenium testing, along with traditional HP toolset.
  • Let's look in a recent product offering in the marketplace, which could be quite applicable to continued growth of Selenium user-base. This post describes a short investigation of HP LeanFT with respect to Selenium testing. 
  • Uncertain if Learn-Selenium website is the right medium for opinion on HP tool, but it seems this tool is the answer specifically to counter the increasing popularity in the screening world of Selenium of HP.

Selenium - what has functioned


1. Price. Price. Price:

Cost by significantly remains the largest differentiator for Selenium. Being open-source, this becomes the automation instrument of choice for browser based programs in medium and small enterprises.

   Powerful support foundation and vivacious user community help mitigate concerns around open-source use in businesses. HP licensing is expensive.

2. Object Identification:

As internet technologies get improved, we have third party tool sets that cause problems in item identification during automation with HP QTP-UFT training. AngularJS, Asynchronous Javascript And Xml, Oracle Forms are illustrations. 

     There are easy alternatives while refining is kept by Hewlett Packard Compaq with every variant. Selenium utilizes XPATH, and identifies things where we confront challenges in discovering exceptional properties utilizing QTP.

3. The Buzz around Dev-Ops:

Dev-Ops is the approach of leveraging automation and test assets in Functions and Development. With raising agile adoption, the lines blur between conventional roles of check automation professional, functional tester, and programmer.

Application Development Leads and Designers have an interest in test-automation for continuous integration, build sanity, and unit testing. It is a a residential district with expertise in Java/C#, and incredibly comfortable with IDEs like Eclipse. 

     They find it hard to consume that something worthwhile can be done with VBscript. These stakeholders are generally key influencers in management decision making on Enterprise Tool Use, resulting in increased acceptability for Selenium in large enterprises.

4. Multi-browser Testing:

Even now, Selenium Training is a clear winner in cross-browser testing against UFT. Multiple UFT add-ins must be attempted for different browser versions and we've compatibility problems. 

     Examples - UFT 11.5 does perhaps not support Chrome v40, you need to downgrade to Chrome v3-6 for automating scripts, which would not be in-sync with creation. HP permit upgrades tend not to keep tempo with browser version modifications.

Selenium - where it falters


1. End To End Automation:

Large Enterprises have multiple programs under test and end-to-finish screening streams that traverse more than one application. Any tool restricted to browser screening would limit coverage of automation. 

     Example - A very common scenario in banking methods would be trade initiated on front-end web application that could have validation measure on back end and main frame database.

2. Object Identification and Script Build Productivity:

We now have lot of cases where QTP can easily get unique property index, that might be cumbersome in Selenium while XPATH use helps identify objects that are problematic. HP QTP/UFT Live Trainings are feature-rich and easy to use. 

  Consistently, script build although this may change predicated on program under evaluation productivity is higher as compared to Selenium.

3. Ability- staffing and base:

HP QTP has become the industry leader since ages, and sourcing seasoned automation examiners in cryptography with VBscript proficient is comparatively simpler. 

   In contrast, ramping a pro Ject group on Selenium Training abilities may be more of a challenge. Note- this is a snapshot as of mid-2015, points change quickly.

HP LeanFT - What's on offer

Circa 2015 July, HP has released LeanFT along with the UFT 12.5 upgrade. Attribute the figure below.


We've detailed below attributes and observations of LeanFT, which bear relevance to the evaluation above.

1. LeanFT supplies Support for multiple IDEs (Eclipse, Visual Studio) and programming languages (Java, C#).

Hewlett Packard Compaq keeps pushing features every few years to retain its dominance (and superior licensing), BPT was launched to sell the thought of BA-Tester, now LeanFT is built to whet the curiosity of the Dev Tester. 

IDE and language flexibility would make the software popular using the Program Programmers community.

2. Dev- CI and Ops help. LeanFT purportedly integrates nicely with SCMs that are standard, assemble/install applications and approaches, as compared to UFT that is heavily ALM centric. 

Selenium was an easy choice compared to QTP in building CI/CD alternatives strongly integrated with dev-workflows. This may change with LeanFT and needs to be inquired.

3. Object identification & Multi-browser support. LeanFT posseses an item identification motor much like Secret Agent in UFT that's installed as plug in to the IDE. This can be an advantage and may be somewhat powerful. 

HP datasheet signifies LeanFT to be light weight tool with good cross browser support. This might potentially address a disparity in HP tool-set where Selenium has an edge over QTP.

4. Price: LeanFT licenses are free for HP UFT12.5 users, this helps penetrate the present user base in big organizations and arrest the move to Selenium Online Training.

5. We've clean integration of LeanFT with UFT12.5, which helps in end to end automation. This allows automation beyond browser-based applications, a definite edge over Selenium Tutorials in organizations like banks and insurance agencies.

6. QTP-proficient staff haven't any learning curve to start automation using LeanFT. Existing resources can be utilized for automation, as against Selenium projects which need well-planned staffing and coaching scheme.

To Conclude:

It appears that LeanFT is especially targeted at the Selenium Tutorial user-base would be very interesting to determine how this pans out in industry in the next 12 months. 

A lot of the current increase in Selenium projects has been because of large organizations wanting to diversify their resources portfolios. Technology tendencies are very dynamic and you also prepare now for hoped-for changes or risk obsolescence.

 Would LeanFT stem the tide? - We might view the events and follow on this in another six months.

Recording Selenium Test Performance

  • After ages, got few minutes to consider new site. I was thinking to have few which is either not available or limited info accessible over net although there are many site accessible for each solution.
  •  I am constantly fascinated by this type of tool and I 've free model of sauce lab and I'd love to build instrument that is such someday in time to come. There is one feature that is recording the session is constantly brought me. 
  • I strove to find some resources which may help me to reach so within my framework.
  • I found Microsoft expression encoder to do recording your screen. You'll be able to use their dlls to add in to your C# established framework record and to perform the session. 
  • You can have some login to determine in the event you need to save record or not in you framework you are able to write a method which begins recording since start and after during cleaning job.
  •  I my framework, as an example, I start recording predicated on my settings file and in teardown methods, I check when there is an error or maybe not. If yes then wmv format is encoded in to by me else I lose recording.
Follow subsequent measures to get code and configurations into framework:

Step 1:


Install Microsoft Encoder Expression: Refer CerebrumLabs.com for that (http://www.cerebrumlabs.com/free-display-recording-computer software/). Once you install, you may get folder that is following in installation location. 

C:Program Files (x86)Microsoft Expression. Should you try and research few folders inside this folder you will find SDK folder @: C:Program Files (x86)Micro-Soft ExpressionEncoder 4SDK, where you can see Microsoft.Expression.Encoder.dlls which you may use in your framework code.

Step 2:

Comprise dlls given in SDK folders into your framework. You call that and can write a method. I have a key-value pair within my framework config file and I could determine maybe not or if I wish to do recording. 

In your evaluation's [set up] process, you'll be able to call this method which will start recording at the beginning of the evaluation.
using System;
.
.
using OpenQA.Selenium;
. .
using Microsoft.Expression.Encoder.ScreenCapture;
using System.Drawing;
using Microsoft.Expression.Encoder;
using Microsoft.Expression.Encoder.Profiles; namespace FRAMEWORK
public static void StartRecordingVideo()
{ //Call this method in setup method. {
//Provide setting in config file if you want to do recording or not.
if (testEInfo.isRecording) { job = new ScreenCaptureJob();
//provide the location where you want to save the recording.
job.CaptureRectangle = Screen.PrimaryScreen.Bounds; job.ShowFlashingBoundary = true;
}
job.OutputPath = AutomationLogging.newLocationInResultFolder; job.Start(); } }

Step 3: Your test started and in the background your display recording going on. After you achieve to the tear-down approach.You can choose not or in case you intend to keep the record

In my case that I want to maintain record so my programmers can review else there is no point of getting if tests are passing, recording only if there is test failure. To do so I 've subsequent system in code that is preceding that I call at the very end in code.

public static void StopRecordingVideo()
        {
{
if (testEInfo.isRecording)
string filename = job.ScreenCaptureFileName;
job.Stop(); if (AutomationLogging.countOfError > 0)
Job jb = new Job();
{ MediaItem src = new MediaItem(filename);
jb.OutputDirectory = AutomationLogging.newLocationInResultFolder;
jb.MediaItems.Add(src); jb.ApplyPreset(Presets.VC1HD720pVBR);
jb.Encode();
string output = ((Microsoft.Expression.Encoder.JobBase)(jb)).ActualOutputDirectory; } File.Delete(filename); }
}

Decision:

During encoding, you might observe that small more memory is being eaten by encoder and you also system may little slow. Attempt at your end and I want to know when you have some question.

Testing with Selenium


Introduction:


  • Global enterprises are challenged to surface performance and load issues, regression and functional issues, and to accomplish business service production monitoring in Rich Internet Application (RIA) environments that use Ajax technology.
  •  Selenium Training is a popular and widely used open-source test development tool. Selenium enables testers to record functional tests of applications in Selenium IDE, a Firefox-based record/playback test development environment. 
  • Playback these tests in Firefox, Internet Explorer, Chrome, Opera, Safari and other browsers.

Features and Benefits:


TestMaker integrates Selenium to provide the following features and benefits:
  • TestMaker repurposes a single Selenium testing as a functional test, load and performance test, and business service monitor. 
  • Scale-up your Selenium testing is to operate in your QA lab, in the PushToTest OnDemand Cloud Test Environment, or both! 
  • TestMaker data-enables Selenium testing for test-driven development. 
  • Dramatically reduce test operating costs. TestMaker efficiently operates multiple Seleniums test in a grid concurrently. 
  • TestMaker runs Selenium tests for browser compatibility testing of your Web application. 
  • Produce actionable knowledge by analyizing the results into 350 or more performance and functional charts. 
  • Transform Selenium tests into Java unit tests for additional features: looping, variables, conditionals
  • Run At User Levels Never Before Possible - Building a test lab used to be prohibitively costly for medium and large scale load tests. Cloud computing delivers bandwidth and computing power to achieve tests in the millions-of-users levels at commodity prices.

Repurposing Methodology and Architecture:


  1. PushToTest Repurposing Methodology applied to Selenium testing  enables many types.
  2. Functional Testing in the Firefox Web Browser - Record test scripts using Selenium IDE, a plug-in to the Firefox browser. Play the test scripts in the Firefox browser. 
  3. Browser Compatibility Tests - Play recorded Selenium testing in Internet Explorer, Safari, Opera, Chrome, and other browsers. Play the tests on a grid of machines with multiple operating environments and multiple browser versions.
  4. Functional Testing - Play recorded Selenium tests as smoke tests, regression tests, and integration tests. 
  5. Load and Performance Testing - Determine the Scalability Index of your application by observing the throughput of your application at increasing levels of concurrently running virtual users. Each virtual user operates a test use case with one or more Selenium tests.
  6. Production Monitoring - Prove compliance with a Service Level Agreement (SLA) by periodically running a Selenium test script. TestMaker sends notification emails when the Selenium script fails or encounters an error condition.
  7. Stress Testing - Understand the behavior as your application comes under unexpected high load conditions.
  8. In each of the above types of tests TestMaker repurposes a single Selenium test script. The TestMaker architecture make repurposing possible.
  9. PushToTest TestMaker operates Selenium tests as load and performance tests by running the tests in one or moreTestNodes. 
  10. The TestNode operates the test in a browser (such as Internet Explorer, Safari, Opera, Chrome) or using HTMLUnit. HTMLUnit is an open-source headless browser framework that provides a programmatic simulation of a Web browser.
  11. HTML Unit uses Rhino, the Mozilla JavaScript engine, to run JavaScript and Ajax programs. This approach makes it easy to run hundreds to thousands of simulated users in a load and performance test. 
  12. The alternative would be costly test runs that start a browser for each simulated user. TestMaker makes it easy to pivot from one type of testing to another. For example, functional testing is often the time to ensure the test scripts work as expected. 
  13. With a click of a button in the TestMaker Editor a functional test becomes a load and performance test. While loading the application under test with several virtual users your test may uncover another functional issue. 
  14. Pivoting back to functional testing is easy with TestMaker. Once you record a test, TestMaker repurposes the test to be a functional test, and load and performance test, and a production monitor.


Often TestMaker users will following this methodology:

a) Record a Selenium test in Selenium IDE using Firefox browser. Save the test in the Selenese file format. Confirm the test runs by playing the test against the application in the Firefox browser.

b) Run the Selenium test in a TestNode in the Firefox browser. Create a TestMaker TestScenario using the TestMaker Editor. Identify one or more Selenium tests to run in a test use case in the Editor's Use Case tab. 

Use the Selenium RC test type and identify *firefox as the browser. TestMaker sends the Selenium test to the TestNode. The TestNode launches Firefox and plays the test. 

The TestNode records the time it takes for each step of the Selenium test to operate. TestMaker plots a set of results charts to identify functional issues in the test and application.

c) Run the Selenium test in a TestNode in the HtmlUnit browser. Same operation but this time using the headless HtmlUnit browser.

d) Run the test as a Load and Performance test. Operates the Selenium test at several levels of load. Identifies the Scalability Index of the application. Surfaces performance bottlenecks and functional issues.

e) Run the test as a Production Monitor. Operates the Selenium test periodically to prove compliance with an SLA and to surface functional issues.


Tutorials:


Please read the tutorial on Selenium testing in TestMaker. The tutorial shows step-by-step instructions to accomplish functional testing, load and performance testing, and business service monitoring of Selenium tests in TestMaker.

Selenium Tutorial: Building Tests of Rich Internet Applications Using Ajax and Selenium

These additional resources are available:

Screencast: Watch the 8 Minute Screencast on TestMaker

DZone RefCard: Introduction To Selenium

Selenium Documentation Project

Open Source Test Workshop

Open Source Test Workshop:


This Open Source Test Workshop is for QA testers, software developers, and network and server managers needing visibility, tools, and methodology into all the demand for IT. This is a deep-technical Workshop to answer your issues:

  • TestMaker repurposes a single Selenium test as a functional test, load and performance test, and business service monitor. 
  • How To Use Selenium in Rich Internet Application (RIA, using Ajax) Environments
  • How To Build Test Suites of SOAP and REST-based Applications using soapUI
  • How To Data Enable Selenium Tests Using TestMaker
  • Testing in Flash/Flex Environments Using AMF Protocols
  • Integrating TestMaker Tests Into Your Continuous Integration Environment
  • How To Analyze Test Results Into Actionable Knowledge
  • Using Glassbox and DynaTrace for Root Cause Analysis
  • Sign-up for the Workshop.


Questions And Answers :


PushToTest, the open source application performance management and load test solution company, participates in the Selenium project. Many times PushToTest's response to a customer issue is in the form of an improvement to Selenium iteself. The following questions and answers originally appeared in DZone.

1. What exactly is Selenium?


  • Selenium is a combination of tools and a domain specific language (DSL) to build and operate functional, smoke tests, and integration tests of Web applications, including Rich Internet Applications (RIA, using Ajax.) 
  • Selenium provides a record/playback tool that plugs-into the Firefox browser. The recordings use the Selenese DSL to express the steps of a test. Selenium plays-back the test steps in the browser using a Javascript-based Browserbot daemon. 
  • Selenium Remote Control (RC) runs the test in Internet Explorer, Firefox, Opera, Safari, Chrome and other browsers. Selenium Grid makes it easy to run these tests in a grid of test machines.

2. How long has the project been around? And how long have you been using it?


  • Selenium had its start at ThoughtWorks, a system integrator and global consulting firm. The core developers released Selenium into an open source distribution in 2006. PushToTest began using Selenium since 2007. 
  • PushToTest was looking for a way to repurpose Selenium tests as load and performance tests, and business service monitors when Olivier Dony and Dominique de Waleffe contributed a TestMaker package to run Selenium tests using the HtmlUnit headless high performance browser. 
  • PushToTest enhanced this work to make the Selenium tests data-driven, to provide root cause analysis and results analysis functions, to provide compatibility to test Ajax applications, and to run these tests in a Cloud testing Environment. 
  • This has been hugely beneficial to organizations needing to reduce costs and take advantage of Selenium's easy-of-test-authoring features.

3. What are the basic steps involved in getting setup with Selenium? (jars/server setup etc)


  • Setup to record and playback tests of Web browser-based applications using Selenium takes about 5 minutes. The Selenium IDE plugs into Firefox as a standard add-on using XPI installation techniques. 
  • To playback the tests in Internet Explorer, Opera, Safari, Chrome and other browsers requires installation and configuration of Selenium RC. Selenium RC uses a daemon architecture. 
  • Start the daemon using a simple command-line call to start Java and run the Selenium RC JAR package. Selenium RC installations take an hour or less. Selenium Grid installs Selenium RC services on a farm of servers.

4. What language is used to write the tests?


  • Selenium implements a domain specific language (DSL) for testing Web applications. For example, the DSL implements commands to click a button, type characters into a test field, and wait until text appears in the page. 
  • Selenium implements the DSL as class library in Java, package in Python, and Ruby, Groovy, C#, Perl, and PHP. The DSL has approximately 200 commands. 
  • PushToTest teaches a 3-day introductory class in Selenium. It takes 2-3 days for most students to become proficient in the Selenium DSL.

5. How well does the record/playback function work?


  • Selenium IDE is designed for Web 1.0 applications. In Web 1.0 environments Selenium's record/playback function works very well. For Rich Internet Applications that use Ajax techniques and widgets, not so much! 
  • Ajax is the Wild West of software development. Everything goes, there is no sheriff, and no standards body exists. Consequently Selenium does not know how to handle asynchronous applications where objects load at their own pace and there is no "wait until idle" function. 
  • Selenium misses Javascript driven clicks, Javascript created frames and pop-up windows. Each miss means the test author needs to manually add Selenium DSL commands.
  • Selenium IDE record/playback does not work well for tests that require looping and conditional branching. These are possible by manually coding Selenium DSL commands in a Java or other scripting language environment. 
  • The solution is to use Selenium IDE's record feature to create simple test use cases, transform them into a Java class, and treat each use case as a component incorporated into a test suite. 
  • There are emerging frameworks to help implement a component approach to Selenium test authoring.

6. Is there a coverage tool that plugs into Selenium?


  • ThoughtWorks Twist is a tool to facilitate a continuous test and integration methodology built on Selenium tests in a team-oriented development environment. There may be others. 
  • There is a lot of excitement and energy in the Selenium space so PushToTest wouldn't be surprised to find coverage tools.

7. Are there any missing features in Selenium? Is there a new release due soon? 


  • A key drawback is Selenium's requirement to playback tests in a real browser. When the browser needs to interact with a user the Selenium test stops running. 
  • For example, when a browser moves from an HTTPS secured page to an HTTP page many browser's security policy kicks in and the browser asks the user to confirm the action. 
  • The Selenium project is working on a next generation technology called WebDriver. WebDriver uses each browser's native API to operate the test commands.
  • Selenium lacks a data production library system to provide operational test data, lacks a way to repurpose tests into load tests, lacks a platform to manage Selenium tests as test assets, and lacks a way to derive the root cause to functional and performance issues. 
  • Thankfully these are provided by many side projects in the Selenium biosphere, including PushToTest, BrowserMob, SauceLabs, and others.
  • The words "coming soon" and Selenium are mutually exclusive. It took the Selenium project 18 months to move from "beta" to "release candidate." 
  • PushToTest is optimistic but not hopeful that Selenium 2.0 with WebDriver technology will appear in 2010.