Selenium

21
ANIL

Transcript of Selenium

Page 1: Selenium

ANIL

Page 2: Selenium

Test automation has specific advantages for improving the long-term efficiency of a software team’s

testing processes. Test automation supports: Frequent regression testing

Rapid feedback to developers Virtually unlimited iterations of test case execution

Support for Agile and extreme development methodologies

Disciplined documentation of test cases Customized defect reporting

Finding defects missed by manual testing

AUTOMATION ADVANTAGES

Page 3: Selenium

Is automation always advantageous? When should one decide to automate test cases?

It is not always advantageous to automate test cases. There are times when manual testing may be

more appropriate. For instance, if the application’s user interface will change considerably in the near

future, then any automation might need to be rewritten anyway. Also, sometimes there simply is not

enough time to build test automation. For the short term, manual testing may be more effective. If an

application has a very tight deadline, there is currently no test automation available, and it’s imperative

that the testing get done within that time frame, then manual testing is the best solution.

TO AUTOMATE OR NOT TO AUTOMATE?

Page 4: Selenium

Adv of selenium over qtp.

QTP VS SELENIUM

Page 5: Selenium

Adv of QTP over Selenium

QTP VS SELENIUM

Page 6: Selenium

Selenium outweighs QTP in three main areas.Cost

FlexibilityParallel Testing

SELENIUM

Page 7: Selenium

Selenium is popular open-source web based automation tool.

It is a free (open source) automated testing suite for web applications across different browsers and platforms.

SELENIUM

Page 8: Selenium

Selenium first came to life in 2004 when Jason Huggins was testing an internal application at Thought Works.

Being a smart guy, he realized there were better uses of his time than manually stepping through the same tests with every change he made. He developed a Javascript

library that could drive interactions with the page, allowing him to automatically rerun tests against multiple browsers. That library eventually became Selenium Core, which underlies all the functionality of Selenium Remote

Control (RC) and Selenium IDE. Selenium RC was ground-breaking because no other product allowedyou to

control a browser from a language of your choosing.

SELENIUM

Page 9: Selenium

It came from a joke which Jason cracked one time to his team. Another automated testing framework was popular

during Selenium’s development, and it was by the company called Mercury Interactive (yes, the company who originally

made QTP before it was acquired by HP). Since Selenium is a well-known antidote for Mercury poisoning, Jason suggested that name. His teammates took it, and so that is how we got

to call this framework up to the present.

SO, WHY THE NAME SELENIUM

Page 10: Selenium

SELENIUM

Page 11: Selenium

Selenium IDE (Integrated Development Environment) is a prototyping tool for building test scripts. It is a Firefox plugin and provides an easy-to-use interface for developing automated tests. Selenium IDE has a recording feature, which records user actions as they are performed and then exports them as a reusable script

in one of many programming languages that can be later executed.Note: Even though Selenium IDE has a “Save” feature that allows users to keep the tests in a tablebasedformat for later import and

execution, it is not designed to run your test passes nor is it designed to build all the automated tests you will need.

Specifically, Selenium IDE doesn’t provide iteration or conditional statements for test scripts. At the time of writing there is no plan

to add such thing. The reasons are partly technical and partly based on the Selenium developers encouraging best practices in

test automation which always requires some amount of programming.

SELENIUM-IDE

Page 12: Selenium

Selenium IDE is simply intended as a rapid prototyping tool. The Selenium developers

recommend for serious, robust test automation either Selenium 2 or Selenium 1 to be used with one of the

many supported programming languages.

SELENIUM-IDE

Page 13: Selenium

Many people get started with Selenium IDE. If you are not already experienced with a programming or

scripting language you can use Selenium IDE to get familiar with Selenium commands. Using the

IDE you can create simple tests quickly, sometimes within seconds.

CHOOSING YOUR SELENIUM TOOL

Page 14: Selenium

SUPPORTED BROWSERS

Page 15: Selenium

The Selenium-IDE (Integrated Development Environment) is the tool you use to develop your Selenium test cases. It’s an easy-to-use Firefox

plug-in and is generally the most efficient way to develop test cases. It also contains a context menu that allows you to first select a UI element from the browser’s currently displayed page and then select from a list of Selenium commands with parameters pre-defined according to the context of the selected UI element. This is not only a time-saver, but also

an excellent way of learning Selenium script syntax.

SELENIUM IDE-INTRODUCTION

Page 16: Selenium

Using Firefox, first, download the IDE from the Selenium. Firefox will protect you from installing add-ons from unfamiliar locations, so you will need to click ‘Allow’ to proceed with the installation, as shown in the

following screenshot.

INSTALLING THE IDE

Page 17: Selenium

INSTALLING THE IDE

Page 18: Selenium

When downloading from Firefox, you’ll be presented with the following window.

SELENIUM IDE-DOWNLOAD

Page 19: Selenium

Restart Firefox. After Firefox reboots you will find the Selenium-IDE listed under the Firefox Tools menu.

SELENIUM IDE-FIREFOX

Page 20: Selenium

To run the Selenium-IDE, simply select it from the Firefox Tools menu. It opens as follows with an empty

script-editing window and a menu for loading, or creating new test cases.

OPENING THE IDE

Page 21: Selenium