Search

Selenium Interview Question - in detail - 1

Question 1:
What is Selenium?
Answer:
Selenium is a browser automation tool which lets you automated operations like – type, click, and selection from a drop down of a web page.

Question 2:
How is Selenium different from commercial browser automation tools?
Answer:
Selenium is a library which is available in a gamut of languages i.e. java, C#, python, ruby, php etc while most commercial tools are limited in their capabilities of being able to use just one language. More over many of those tools have their own proprietary language which is of little use outside the Selenium is a suite of tools for browser automation. It is composed of "IDE", a recording and playback mechanism, "WebDriver" and Remote Control "RC" which provide APIs for browser automation in a wide variety of languages, and "Grid", which allows many tests using the APIs to be run in parallel. QA Tester should not forget to mention during interview that with the release of Selenium 2, Selenium RC has been officially deprecated in favor of Selenium WebDriver. It works with most browsers, including Firefox from 3.0 up to 8, Internet Explorer 8, Google Chrome, Safari and Opera 11.5.

  • Describe technical problems that you had with Selenium tool?
As with any other type of test automation tools like SilkTest, HP QTP, Watir, Canoo Webtest, Selenium allows to record, edit, and debug tests cases. However there are several problems that seriously affect maintainability of recorded test cases, occasionally Quality Assurance Engineers complain that it takes more time to maintain automated test cases than to perform manual testing; however this is an issue with all automated testing tools and most likely related to improper testing framework design. Another problem is complex ID for an HTML element. If IDs is auto-generated, the recorder test cases may fail during playback. The work around is to use XPath to find required HTML element. Selenium supports AJAX without problems, but QA Tester should be aware that Selenium does not know when AJAX action is completed, so ClickAndWait will not work. Instead QA tester could use pause, but the snowballing effect of several 'pause' commands would really slow down total testing time of test cases. The best solution would be to use waitForElement.t test can Selenium do?
Selenium could be used for the functional, regression, load testing of the web based applications. The automation tool could be implemented for post release validation with continuous integration tools like Jenkins, Hudson, QuickBuild or CruiseControl.

  • What is the price of Selenium license per server?
Selenium is open source software, released under the Apache 2.0 license and can be downloaded and used without charge.

  • How much does Selenium license cost per client machine?
Selenium is open source software, released under the Apache 2.0 license and can be downloaded and used without charge.

  • Where to download Selenium?
Selenium can be downloaded and installed for free from seleniumhq.org

  • What is the latest version of Selenium components?
The latest versions are Selenium IDE 1.3.0, Selenium Server (formerly the Selenium RC Server) 2.9.0, Selenium Client Drivers Java 2.9.0, Selenium Client Drivers C# 2.9.0, Selenium Client Drivers Ruby 2.8.0, Selenium Client Drivers Python 2.9, Selenium Grid 1.0.8.

  • What is Selenium IDE?
Selenium IDE is a Firefox add-on that records clicks, typing, and other actions to make a test cases, which QA Tester can play back in the Firefox browser or export to Selenium RC. Selenium IDE has the following features: record/play feature, debugging with step-by-step and breakpoints, page abstraction functionality, an extensibility capability allowing the use of add-ons or user extensions that expand the functionality of Selenium IDE

  • What are the limitations of Selenium IDE?

Selenium IDE has many great features and is a fruitful and well-organized test automation tool for developing test cases, in the same time Selenium IDE is missing certain vital features of a testing tool: conditional statements, loops, logging functionality, exception handling, reporting functionality, database testing, re-execution of failed tests and screenshots taking capability. Selenium IDE doesn't for IE, Safari and Opera browsers.

  • What does SIDE stand for?
Selenium IDE. It was a very tricky interview question.

  • What is Selenium Remote Control (RC) tool?
Selenium Remote Control (RC) is the powerful solution for test cases that need more than simple browser actions and linear execution. Selenium-RC allows the developing of complex test scenarios like reading and writing files, querying a database, and emailing test reports. These tasks can be achieved by tweaking test cases in your preferred programming language. Selenium RC has been officially deprecated in favor of Selenium WebDriver.

  • What are the advantages using Selenium as testing tool?
If QA Tester would compare Selenium with HP QTP or Micro Focus SilkTest, QA Engineer would easily notice tremendous cost savings for Selenium. In contrast to expensive SilkTest license or QTP license, Selenium automation tool is absolutely free. It means that with almost no investment in purchasing tools, QA Team could easily build the state of the art test automation infrastructure. Selenium allows developing and executing test cases in various programming languages including .NET, Java, Perl, RubyPython, PHP and even HTML. This is a great Selenium advantage, most likely your software developers already know how to develop and maintain C# or Java code, so they transfer coding techniques and best practices to QA team. Selenium allows simple and powerful DOM-level testing and in the same time could be used for testing in the traditional waterfall or modern Agile environments. Selenium would be definitely a great fit for the continuous integration tools Jenkins, Hudson, CruiseControl, because it could be installed on the server testing box, and controlled remotely from continuous integration build.

  • What is Selenium Grid?
Selenium Grid extends Selenium RC to distribute your tests across multiple servers, saving you time by running tests in parallel.

  • What is Selenium WebDriver?
Selenium WebDriver is a tool for writing automated tests of websites. It is an API name and aims to mimic the behavior of a real user, and as such interacts with the HTML of the application. Selenium WebDriver is the successor of Selenium Remote Control which has been officially deprecated.

  • How many browsers are supported by Selenium IDE?
Test Engineer can record and playback test with Selenium IDE in Firefox.

  • Can Selenium test an application on iPhone's Mobile Safari browser?
Selenium should be able to handle Mobile Safari browser. There is experimental Selenium IPhone Driver for running tests on Mobile Safari on the iPhone, iPad and iPod Touch.

  • Can Selenium test an application on Android browser?
Selenium should be able to handle Android browser. There is experimental Selenium Android Driver for running tests in Android browser.

  • What are the disadvantages of using Selenium as testing tool?
Selenium weak points are tricky setup; dreary errors diagnosis; tests only web applications

  • How many browsers are supported by Selenium Remote Control?
QA Engineer can use Firefox 7, IE 8, Safari 5 and Opera 11.5 browsers to run actuall tests in Selenium RC.

  • How many programming languages can you use in Selenium RC?
Several programming languages are supported by Selenium Remote Control - C# Java Perl PHP Python Ruby

  • How many testing framework can QA Tester use in Selenium RC?
Testing frameworks aren't required, but they can be helpful if QA Tester wants to automate test cases. Selenium RC supports Bromine, JUnit, NUnit, RSpec (Ruby), Test::Unit (Ruby), TestNG (Java), unittest (Python).

  • How to developer Selenium Test Cases?
Using the Selenium IDE, QA Tester can record a test to comprehend the syntax of Selenium IDE commands, or to check the basic syntax for a specific type of user interface. Keep in mind that Selenium IDE recorder is not clever as QA Testers want it to be. Quality assurance team should never consider Selenium IDE as a "record, save, and run it" tool, all the time anticipate reworking a recorded test cases to make them maintainable in the future.

  • What programming language is best for writing Selenium tests?
The web applications may be written in Java, Ruby, PHP, Python or any other web framework. There are certain advantages for using the same language for writing test cases as application under test. For example, if the team already have the experience with Java, QA Tester could always get the piece of advice while mastering Selenium test cases in Java. Sometimes it is better to choose simpler programming language that will ultimately deliver better success. In this case QA testers can adopt easier programming languages, for example Ruby, much faster comparing with Java, and can become become experts as soon as possible.

  • Have you read any good books on Selenium?
There are several great books covering Selenium automation tool, you could check the review at Best Selenium Books: Top Recommended page

  • Do you know any alternative test automation tools for Selenium?
Selenium appears to be the mainstream open source tool for browser side testing, but there are many alternatives. Canoo Webtest is a great Selenium alternative and it is probably the fastest automation tool. Another Selenium alternative is Watir, but in order to use Watir QA Tester has to learn Ruby. One more alternative to Selenium is Sahi, but is has confusing interface and small developers community.

  • Compare HP QTP vs Selenium?
When QA team considers acquiring test automation to assist in testing, one of the most critical decisions is what technologies or tools to use to automate the testing. The most obvious approach will be to look to the software market and evaluate a few test automation tools. Read Selenium vs QTP comparison

  • Compare Borland Silktest vs Selenium?

  • How to test Ajax application with Selenium
Ajax interview questions could be tough for newbie in the test automation, but will be easily cracked by Selenium Tester with a relevant experience. Read the detailed approach at Testing Ajax applications with Selenium in the right way

  • How can I learn to automate testing using Selenium?
Don't be surprised if the interviewer asks you to describe the approach for learning Selenium. This interviewer wants to hear how you can innovative software test automation process the company. Most likely they are looking for software professional with a good Selenium experience, who can do Selenium training for team members and get the team started with test automation. I hope this Selenium tutorial will be helpful in the preparation for this Selenium interview question.
This is a placeholder post for Selenium 2 Cookbook book review. This new Selenium book is available for pre-order and will be released on February 16, 2012. The book written by test automation specialist Roy de Kleijn and based on his practice oriented Selenium trainings. It contains quick answers to common Selenium 2 problems in the form of over 70 recipes to master Selenium 2.

Technical Book Details:
Title: Selenium 2 Cookbook
Author: Roy de Kleijn
Publisher: Packt Publishing
Pages: 220
Print ISBN: 978-1849515740 ; ISBN 10: 1-8495-1574-3

 

Selenium benefits in Agile development

Compared to traditional waterfall software development projects, the role of test automation in agile development projects is more critical and significantly different. The close collaboration between product owners, testers and developers in agile software projects also changes the way that quality is managed. Managing quality is not seen as a discrete discipline done in isolation; it is viewed more as an integral part of overall project management with multiple stakeholders sharing responsibilities for quality and testing. This approach leads to different requirements for test automation and test management tools used to manage releases, user stories, defects and tasks. Traditional test automation and test management tools often cannot accommodate the required changes to processes, skills, attitude, and responsibility that the shift to agile management practices brings.

Selenium is the truly Agile automation testing tool. It allows agile teams to generate scripts using their preferred method based on the skills of team members – either visually using Selenium IDE or using a programing languages such as PHP, Java, C#, Ruby, Python. This fosters collaboration between cross-functional Agile team, helps to manage code and test together, and minimize future test-script maintenance effort. 

1 comment: