![]() |
Web Development »
Applications & Tools »
Tools with source code
Intermediate
WebReplay - an automated software testing tool for Web applicationsBy Emmanuel KartmannThis article presents an automated software testing tool for Web applications (Internet/Intranet) based on Internet Explorer. |
VC7Win2K, WinXP, MFC, IE6.0, IE5.5, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
Web Replay is an automated software testing tool for Web applications. It helps in detecting bugs and regressions in Web applications by replaying scenarios to test the application.
Using WebReplay, you can automatically navigate to a Web page, fill in form fields, click on the submit (OK) button, and then continue to another Web page.
To use Web Replay, build an XML Scenario File (see below), type the name of the file in the edit box and click on the Replay button.
Web Replay is based on Microsoft's WebBrowser control (Microsoft� ActiveX� control). It embeds the control into a very simple dialog-based application which loads an XML scenario file and programmatically drives the WebBrowser control (via its COM Interface IWebBrowser2) to execute the scenario.
Web Replay provides the following features:
set_value and click:
set_value simulates a change in the HTML element's value (input, select, etc...).
click simulates a mouse click on the HTML element (any element). innerText and/or Href.
An XML scenario file looks like this:
<?xml version="1.0" encoding="Windows-1252"?>
<web_replay>
<scenario>
<!-- Search something in codeproject -->
<!-- Scenarios are divided into steps (one step per page download) -->
<step>
<!-- Every step can contain one or more actions -->
<!-- Action can be of type "navigate" =
Web Replay will navigate to the given URL -->
<action type="navigate" url="http://www.codeproject.com" />
</step>
<step>
<!-- Action can be of type "control" =
Web Replay will interact with an HTML element -->
<action type="control"
name="target" event="set_value" value="WebReplay" />
<!-- This field is unnamed; but it has a specific value attribute -->
<action type="control" name="" value="Go" event="click" />
</step>
</scenario>
</web_replay>
To build a scenario file, you need to basically know the names (or ids) of HTML elements within your Web Application. Alternatively, you can use an empty name and use the HTML element's value (for unnamed items).
How do you test code? Well, just write a test program! Web Replay helps you with this by providing a simple way of testing you Web apps. But it's still a brand new program; the TODO list is long...
V1.0 - $Date: 2005-06-16 11:50:08 +0200 (Thu, 16 Jun 2005) $
General
News
Question
Answer
Joke
Rant
Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+PgUp/PgDown to switch pages.
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 16 Jun 2005 Editor: Sumalatha K.R. |
Copyright 2005 by Emmanuel Kartmann Everything else Copyright © CodeProject, 1999-2010 Web20 | Advertise on the Code Project |