CSC/ECE 517 Fall 2013/ch1 1w32 av: Difference between revisions
(→Watir) |
(→Watir) |
||
Line 30: | Line 30: | ||
==Watir== | ==Watir== | ||
Watir is an open-source (BSD) family of Ruby libraries for automating web browsers. Watir drives browsers the same way people do. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page or not. | Watir, pronounced water, stands for Web Application Testing in Ruby. Watir is an open-source (BSD) family of Ruby libraries for automating web browsers. It is distributed as a Ruby GEM named 'Watir'. Watir drives browsers the same way people do. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page or not. | ||
There are 2 version available : | There are 2 version available : | ||
* Watir : supports only Internet Explorer on Windows | * Watir-Classic : supports only Internet Explorer on Windows | ||
* Watir-WebDriver : supports Chrome, Firefox, Internet Explorer, Opera and also running in headless mode (HTMLUnit). | * Watir-WebDriver : supports Chrome, Firefox, Internet Explorer, Opera and also running in headless mode (HTMLUnit). | ||
Revision as of 22:06, 6 October 2013
Introduction
Graphical user interface testing is the process of testing a product's graphical user interface to ensure it meets its designed specifications.
GUI testing is difficult mainly due to following reasons :
- Large space of possibilities. Each sequence of GUI commands can result in various states. Evaluation of all these states is essential for validation of the GUI of the given software.
- Event-driven architecture. The test suite has to simulate the various user created actions.
Following are the challenges encountered while testing the graphical user interface of any software or system:
- Automation is difficult.
- The scope for testing is enormous
- Inability to determine the state of the program from GUI.
- Regression testing is difficult. Testcases may not be reusable
The current trend in user interfaces is geared towards graphical user interfaces (GUIs). This presents a problem for designing tests for software, since GUIs are very complex and hence GUI testing is very time consuming. Automation is a requirement for testing any larger graphical user interfaces, but automating GUI tests isn’t a straightforward task. Techniques which are familiar from the command line interface (CLI) age, don’t translate to the GUI world without problems.
GUI Testing Tools
GUI testing tools serve the purpose of automating the testing process of software with graphical user interfaces. Following are few of the available open source GUI testing tools:
- AutoHotkey
- CubicTest
- Dogtail
- Dojo
- Selenium
- Watir
- Xnee Recorder and replayer
Selenium
Selenium is a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language (Selenium IDE). It also provides a test domain-specific language (Selenese) to write tests in a number of popular programming languages, including Java, C#, Groovy, Perl, PHP, Python and Ruby. The tests can then be run against most modern web browsers. Selenium deploys on Windows, Linux, and Macintosh platforms.
Watir
Watir, pronounced water, stands for Web Application Testing in Ruby. Watir is an open-source (BSD) family of Ruby libraries for automating web browsers. It is distributed as a Ruby GEM named 'Watir'. Watir drives browsers the same way people do. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page or not.
There are 2 version available :
- Watir-Classic : supports only Internet Explorer on Windows
- Watir-WebDriver : supports Chrome, Firefox, Internet Explorer, Opera and also running in headless mode (HTMLUnit).