Pages

Tuesday 10 January 2012

Test Automation for Web Applications




Many, perhaps most, software applications today are written as web-based applications to be run in an Internet browser. The effectiveness of testing these applications varies widely among companies and organizations. In an era of highly interactive and responsive software processes where many organizations are using some form of Agile methodology, test automation is 
frequently becoming a requirement for software projects. Test automation is often the answer. Test automation means using a software tool to run repeatable tests against the application to be tested. For regression testing this provides that responsiveness.

There are many advantages to test automation. Most are related to the repeatability of the tests and the speed at which the tests can be executed. There are a number of commercial and open source tools available for assisting with the development of test automation. Selenium is possibly the most widely-used open source solution. This user’s guide will assist both new and experienced Selenium users in learning effective techniques in building test automation for web applications.

This user’s guide introduces Selenium, teaches its features, and presents commonly used best practices accumulated from the Selenium community. Many examples are provided. Also, technical information on the internal structure of Selenium and recommended uses of Selenium are provided.
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
Selenium RC
Selenium Remote Control is great for testing complex AJAX-based web user interfaces under a Continuous Integration system. It is also an ideal solution for users of Selenium IDE who want to write tests in a more expressive programming language than the Selenese HTML table format.
Read More about Selenium Remote-Control in our documentation





Sunday 8 January 2012

Beginner's guide to Selenium


Overview –
Selenium IDE is an integrated development environment for performing automation tests for web applications.  Selenium tests can be written as HTML tables or coded in various languages like Java , C#, PHP, Perl, Python and can be run directly in most modern browsers (Firefox, IE, Chrome, Safari) present in the industry. The IDE can help you to record, edit and debug tests. Selenium IDE is only available for Firefox.

Pre requisite for Test Developer –
1.       Experience on QTP does help to quickly learn Selenium as the base of automation remains the same.  
      For those who aren’t much experience in to QTP / automation, should read some books, blogs on QTP    
      to understand how it works.
2.       Knowledge of any one of these languages (Java , C#, PHP, Perl, Python) is must, otherwise you will   
       end up with only recorded scripts and won’t be able to enhance them.

Selenium installation—
1.       Install Firefox (http://www.mozilla.org/en-US/firefox/new/)


2.       Install Java jdk: Download jdk (not JRE) without Netbeans IDE or JEE. 
      (http://www.oracle.com/technetwork/java/javase/downloads/index.html)


3.       Install (optional) Junit for java rc client(ONLY if you are using java client, you also need to add selenium   
       java client driver in classpath)


Main TOOLS Installation:


4.       Install Selenium IDE (http://seleniumhq.org/download/)
            After installation - you should see selenium ide option in Firefox.


Example –
We will see how to create a simple test in Selenium. So let’s get started.