Table of Contents
This chapter will use the Squish IDE to create, run, and extend a test of a sample web application. We will use the web interface of the W3C Markup Validation Service to demonstrate how Squish is used to test web applications.
Even though we will use the Squish IDE, a graphical front end to the Squish testing framework, anything we will do can also be accomplished using command line tools which is interesting when thinking about automating your tests (doing nightly runs of your regression test suite, for example). Whenever we describe how to do something using the Squish IDE we will also show how to do it with the command line tools. For full details on Squish's command line tools, please refer to the Reference Manual (Chapter 16).
![]() | Tip |
|---|---|
The complete test suite we create in this tutorial is available in
|
For testing applications with Squish, a special server application called squishserver must be running (for further information, you might want to have a look at the section Squish Concepts and Making an Application Testable (Chapter 4)). If you use the Squish IDE, you don't need to worry about this since the Squish IDE will start a server automatically and care about everything. However, not using the Squish IDE means that you have to start squishserver manually before you can record or run any tests. Please see the respective section in the command line reference squishserver (Section 16.5.2) for information how to do this.
![]() | Note |
|---|---|
Due to a technical limitation in Konqueror, it is not possible to test websites running on a different host than localhost in Konqueror. So if you need to access web pages which are not located on the local machine you can circumvent this problem by forwarding the remote port of the webserver to localhost. You can use e.g. ssh to forward the connection. If you want to test, e.g. www.google.com you can forward it by ssh -L 8080:www.google.com:80 localhost Now simply direct Squish to use http://localhost:8080 instead of http://www.google.com and you should be able to test it just fine. |