Scripting Web Tests

Installation Instructions

These instructions describe how to install the software we use in our Scripting Web Tests class (also called Scripting for Testers).

We will be using Ruby (a programming language) and Watir (a library) on your machine to test server software. You will also run the server software on your computer.

Hardware Requirements

The class software runs on Windows machines. We recommend Windows 2000 or Windows XP. You should have Administrator privileges.

We believe that it will also work on Windows NT and Windows 98, but we don’t support these in our classes. (Our experience has been that machines that are still running these operating systems often are too slow or have other problems that we don’t have time to support in a class environment. Sorry.)

The Watir library requires Internet Explorer and therefore only runs on Windows. The Timeclock server was developed on a Macintosh, and should run on any machine supporting Ruby (Unix, Linux, Mac, Windows). (The Timeclock “product tests” will not run on Windows using the mswin build—the one you use for the class. They will run on Windows using the cygwin build.)

Installing the Software

Students are provided with a CD that includes all of the software referenced here. For your convenience we also provide links to where these materials can be found online.

Ruby

We are currently using Ruby for Windows 1.8.2-14 (There are known problems with Ruby 1.8.1-13; don’t use it.)

  1. Double-click this exe file to install.
  2. Select the default installation options (choose all options; install in c:/ruby).
  3. If you are installing as Administrator you don’t need to restart windows. Otherwise, you should.

Watir

We are using Watir 1.3.1

  1. Unzip this into c:\watir
  2. Execute install.rb
  3. Use all the default installation options

Scripting Class Materials

We are using Scripting101 1.5.2

  1. Extract the contents of this archive into your hard drive (c:). A “scripting101” directory will be created automatically.

SpySmith

We are using SpySmith v 1.0 from QualityForge. This is a commercial tool available for free as a 90-day evaluation.

  1. Open the zip file using WinZip.
  2. Extract all files in this zip archive to top-level drive, e.g. C:\ or D:\ etc. (or create a directory to use as your top-level).

Running the Timeclock Server.

You will need to start up a timeclock server on your machine.

  1. Start a command shell. (Start-> Run, enter “cmd”.)
  2. Enter “cd c:\scripting101\timeclock\bin”.
  3. Enter “ruby http-server.rb”. The server is now running.

Note: If you close this command window, the server will stop.

You can verify that the server is running correctly by running some sample tests.

  1. Start a new command shell.
  2. Enter “ruby c:\scripting101\solutions\suite.rb -b”.

Note: These tests will run unbearably slowly if Internet Explorer is configured to use a proxy server that happens to be unavailable.