How does WATIR work?

Watir will drive web applications that are served up as HTML pages in a web browser. Watir will not work with ActiveX plugin components, Java Applets, Macromedia Flash, or other plugin applications. To determine whether Watir can be used to automate a part of a web application, right click on the object and see if the View Source menu option is available. If you can view the HTML source, that object can be automated using Watir.

What is WATIR?

“Watir” stands for “Web Application Testing in Ruby”. Watir is an automated test tool which uses the Ruby scripting language to drive the Internet Explorer web browser. Watir is a toolkit for automated tests to be developed and run against a web browser.

Visual Studio (VSTS) Automation Testing Tool

VS Test Types: VS 2010 testing tools provide several test types that can be used for specific software testing purposes. Custom Test Types can also be created to meet other testing needs.  VS 2010 supports the following test types “out of the box”:

  • Unit Tests
    • §  Unit tests give developers and testers a quick way to check for logic errors in the methods of classes in C#, Visual Basic .NET, and C++ projects. Unit tests allow the developer to assess the quality of their own code and also provide a security mechanism to reduce regressions when adding new functionality or changing existing functionality (such as when refactoring). An additional feature of Unit Tests is that they can be re-used within Load/Performance tests, providing broad, flexible support for application performance testing.
  •  Web Tests
    • §  A Web Performance test (previously simply called a Web test in VSTS 2005/2008) consists of a series of HTTP requests. Web tests work at the protocol layer by issuing HTTP requests. Web tests do not run JavaScript. However, you can simulate JavaScript actions at runtime by using Web test plug-ins, Web test request plug-ins, extraction rules, or coded Web tests. Web tests are used to test the functionality of Web applications and to test Web applications under load. Web tests are used both in performance tests and stress tests.  You can create Web tests by recording your activities in a browser session.  You can also build Web tests manually by using the Web Test Editor.
  •  Load Tests
    • §  The primary goal of a load test is to simulate many users accessing a server at the same time. When you add Web tests to a load test, you simulate multiple users opening simultaneous connections to a server and making multiple HTTP requests. You can set properties on load tests that broadly apply to the individual Web tests. When you add unit tests to a load test, you exercise the performance of non-Web based server components. An example application of a unit test under load is to test data access model components. Load tests can be used with a set of computers known as a Test Environment (aka Test Rig), which consists of agents and a controller.
  • Coded UI Tests
    • §  Coded UI tests are automated tests of the user interface. These tests provide functional testing of the user interface and validation of user interface controls. Automated UI tests enable you to test to ensure the user interface is functioning correctly. They are quicker to run than manual tests thus can be run more frequently.  A key advantage to these tests is that they use .Net languages (code is generated for C# and VB.Net) against a .Net API, thus organizations can use/re-use familiar skills and existing code to test their apps. This also results in the test team having interchangeable skills with the development team.
  • Manual Tests
    • §  In VS 2005/2008 manual tests are usually in the form of a Word document, in VS2010 this format is deprecated and is replaced by the new Work Item based Test Case already discussed.
  • Generic Tests
    • §  You use generic tests to wrap external programs and tests that were not originally developed for use in the Visual Studio Test Tools.  After you have done this, the generic test is treated by the test engine as any other test type. That is, you can work with generic tests using the Visual Studio Test Tools windows. For example, you can run generic tests from the Test View window and the Test List Editor and you can obtain and publish results from generic tests as from other tests.
  • Ordered Tests
    • §  An ordered test contains other tests that are meant to be run in a specified order. An ordered test appears as a single test in the Test List Editor and the Test View window. Its results appear in a single row in the Test Results window, but you can obtain individual results for each test that was run as a part of the ordered test.

What is QTP?

QTP stands for Quick Test Professional. QTP is the flagship functional automation testing tool from Mercury Interactive now acquired by HP. It is also called as HP Functional Test

Features of QTP:

  • It is an icon based tool, which automates the functional & regression testing of an application
  • QTP is easier to use and implement for both technical & non technical testers in comparison to other functional testing tools available.
  • Quick Test  is the market leader in Functional Automation Tool with over 50% market share
  • QTP’s Scripting Language is VB Script which is easy to use , understand and program
  • Quick Test Professional  enables Business Process Testing (BPT)
  • Supports large pool of  software development environments like SAP , Web , Oracle etc.

W3C Quality Assurance Automation Testing Tool

W3C Quality Assurance Automation Testing Tool was very much useful to test website. It provide web accessibility evaluation tools can significantly reduce the time and effort to evaluate Web sites.

You can test HTML, DHTML, XHTML, MIL, MathML, etc document by using Markup Validator. Link checker will find the issues with link broken, anchors and referenced objects in a Web page, CSS style sheet, or recursively on a whole Web site. For best results, it is recommended to first ensure that the documents checked use Valid (X)HTML Markup and CSS.

CSS Validator use to check to css of the document.

  • Unicorn – W3C’s Unified Validator
  • The MarkUp Validator – Also known as the HTML validator, it helps check Web documents in formats like HTML and XHTML, SVG or MathML.
  • The CSS Validator – validates CSS stylesheets or documents using CSS stylesheets

WAPT Testing Tool Use For Load, Performance and Stress Testing

I have used WAPT testing tool. It is very easy to use and understand automated software testing tool. You  do not required to use programming knowledge. You can pass dynamic data from using tool features.   Powerful GUI based recording capabilities and a no-programming required user interface allows testers to quickly set up even complex test cases. A built-in editor allows users to build tests that can be easily edited to allow for changes in the test cases.

WAPT is a load and stress testing tool for web sites and intranet applications. It provides ways for accurate load simulation, run-time test data generation and more. You can use the task editor to create task or use the built-in recorder to record the actions of a virtual user, which can then be replayed, edited and tested. WAPT can simulate multiple users for each scenario, custom implement delays between requests and dynamically generate test data parameters.The values of request parameters and URIs can be calculated in a number of ways and even be determined by the server response to the previous request. The results are displayed in easy to understand graphical chart displays and reports.

Advanced software testing allows the use of over 300 various editable commands that allow users to create and manage complex scripts easily.

 

Selenium IDE Automation Testing Tool

Selenium IDE is very easy to operate and popular testing tool. Mostly people are using for regression testing. It the a Firefox plugin, and allows you to record, edit, and debug tests. Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly record and play back tests in the actual environment that they will run. Selenium IDE is not only recording tool but  it is a complete IDE. You can choose to use its recording capability, or you may edit your scripts by hand. With autocomplete support and the ability to move commands around quickly, Selenium IDE is the ideal environment for creating Selenium tests no matter what style of tests you prefer. It can also export Remote Control or WebDriver scripts. The Selenium Server is needed in order to run either Selenium RC style scripts or Remote Selenium Webdriver ones.  Selenium Rc is useful when dynamic data are passing in to the test script.

 

Selenium RC(Remote Control): Selenium is a set of different software tools each with a different approach to supporting browser automation. These tools are highly flexible, allowing many options for locating and manipulating elements within a browser, and one of its key features is the support for automating multiple browser platforms. This package contains the .NET bindings for the older, more procedural Selenium Remote Control (or Selenium RC) API. It requires a running instance of the Selenium Server, and uses JavaScript for automating the browser, which means it is limited to the functionality available from within the JavaScript sandbox. How to use Selenium Testing tool ?

1. Open firefox. Download Selenium testing tool from : http://selenium-ide.openqa.org/download.jsp

2. Close the firefox browser. Reopen again.

3. Check Firefox -> Tools  -> Selenium IDE

4. Select Selenium IDE. Selenium window will open.

5.  Select Red Record Test button on right hand side.

6. Open the Web application on firefox.

7. Click on Play button to stop recoding scripts.

8.  Save the Test suite.

9. Click on the ‘ Source’ tab you can see the test html generated by selenium and the ‘table’ tab shows the commands recorded by Selenium.

10.Click on the Selenium IDE’s play button to run the recorded test suite.

11. After the test is complete you should see the in the ‘Log section’. It shows the various events run by the test. In the table tab you can see that all the rows are green, which means that the test run successfully.

12. You can also use selenium test runner  to execute test suit. Features:

  • Easy record and playback
  • Intelligent field selection will use IDs, names, or XPath as needed
  • Autocomplete for all common Selenium commands
  • Walk through tests
  • Debug and set breakpoints
  • Save tests as HTML, Ruby scripts, or any other format
  • Support for Selenium user-extensions.js file
  • Option to automatically assert the title of every page
  • NEW! Easy customization through plugins
  • Adding new functionality to the API
  • Changing existing functionality
  • Custom formats and export capabilities

Selenium RC:

Selenium Remote Control (RC) is a testing tool that allows you to write automated web application UI , regression tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

Selenium RC Divided in Two Part:

  • Selenium server launches and kills browsers, interprets and runs the Selenese commands passed from the test program, and acts as an HTTP proxy, intercepting and verifying HTTP messages passed between the browser and the AUT.
  •  Selenium RC has client libraries which provide the interface between each programming language and the Selenium RC Server. Client libraries communicate with the Server passing each Selenium command for execution. Then the server passes the Selenium command to the browser using Selenium-Core JavaScript commands. The browser, using its JavaScript interpreter, executes the Selenium command. Run and verifying  the commands specified in your test scripts.
  • The Server receives the Selenese commands from your test program using simple HTTP GET/POST requests. This means you can use any programming language that can send HTTP requests to automate Selenium tests on the browser.

How to Install and Use Selenium RC?

  1. Install Selenium server : http://seleniumhq.org/download/
  2.  Zip file downloaded. Extract  the selenium server java  jar file in desired directory.
  3. Download Selenium java client driver zip from the SeleniumHQ downloads page. (Note:  Download language specific client driver. Selenium supporting multiple language like, java, c#, python, ruby, php, perl)
  4. Extract selenium-java-<version-number>.jar file in desired folder.
  5. Open your desired Java IDE (Eclipse, NetBeans, IntelliJ, Netweaver, etc.)
  6. Create a java project.
  7. Add the selenium-java-<version-number>.jar files to your project as references.
  8. Add to your project classpath the file selenium-java-<version-number>.jar.
  9. From Selenium-IDE, export a script to a Java file and include it in your Java project, or write your Selenium test in Java using the selenium-java-client API. You can either use JUnit, or TestNg to run your test, or you can write your own simple main() program.
  10. Run Selenium server from the console.
  11. Go to the directory where Selenium RC’s server is located and run the following from a command-line console.

    java -jar selenium-server-standalone-<version-number>.jar

  12. Execute your test from the Java IDE or from the command-line.

Example of  Java Programing Code:

** Add JUnit framework to your classpath if not already there
     *  for this example to work
    */
package com.example.tests;

import com.thoughtworks.selenium.*; //This is the driver's import.
import java.util.regex.Pattern;
// Selenium-IDE add the Pattern module because it's sometimes used for
// regex validations. You can remove the module if it's not used in your
// script.
public class NewTest extends SeleneseTestCase {
    public void setUp() throws Exception {
        setUp("http://www.google.com/", "*firefox");
        // We instantiate and start the browser
 }
      public void testNew() throws Exception {
         // (From Selenium-IDE, export a script to a Java file and use those recoded commands here.....)
          selenium.open("/");
          selenium.type("q", "selenium rc");
          selenium.click("btnG");
          selenium.waitForPageToLoad("30000");
          assertTrue(selenium.isTextPresent("Results * for selenium rc"));
          // These are the real test steps
 }

}

UI Automation Testing Tools

UI Automation testing tools are very useful to Developer and Tester. It save lots of time of both user.

Telerik is one of the easiest tool for testing application UI and performance.

No of reason why to use Telerik  testing tool:

1. Test HTML5, AJAX, Silverlight and WPF apps, JavaScript calls, Telerik controls, dynamic page synchronization, client-side behaviors, complex UI virtualizations and elaborate XAML animations. Quickly convert them to performance tests to identify performance robbing bottlenecks.

2. The built-in test recorder will help you create tests with just point-and-clicks and then easily update and customize them if necessary.

Create Test -> Record -> Execute

3. Useful in Regression Testing : Run your tests against all browsers at once: Internet Explorer, Firefox, Safari and Chrome. Besides, elements are shared between all tests in a project – modify an element to have the change applied to all tests.

4.  The tool ships with a standalone app and a Visual Studio plug-in that use the same repositories and file formats. Now QAs can check-in tests in the main project, which developers can then extend with code

Test Type:

HTML, Asp.Net, Ajax Automation, Java Script, Silverlight Test, WPF Test, Data-Driven Testing

Cross Browser Compability  Testing:  (Adobe Browser Lab)

Accurately pinpoint browser compatibility issues and compare web pages at a glance in Adobe BrowserLab to easily identify differences and potential problems. Preview full screenshots with multiple view options and customizable test settings.

Preview your web pages on a variety of browsers, including Chrome, Safari, Firefox, and Internet Explorer, on Windows and Mac OS.

Easily and accurately align screenshots to a specific point with Smart Align to more easily see differences across browsers.

Save time by easily accessing pages you’ve recently tested in the URL history of BrowserLab

Saving time and Money: Dramatically reduce the need for dedicated testing hardware or additional virtualization software. Eliminate the necessity to install multiple browsers on your computer.

Download Url: http://www.adobe.com/cfusion/tdrc/index.cfm?product=web_premium

 

Multiple IE Testing Tool:

I found great tools for testing websites in all version of Internet Explorer. Although it’s addressed to experienced users, IETester is impressively easy to use, so you can quickly take advantage of its great features without wasting your time on getting used to it.

Download Url: http://www.softpedia.com/progDownload/IETester-Download-101019.html

Download multiple IE Url: http://tredosoft.com/Multiple_IE

Multiple IE  software allows you to install and run Internet Explorer 3.0 and above at the same time; however, does cause some issues if you have dreamweaver installed.