Table of Contents
Squish 4 is a completely new release of the Squish testing toolset. This new version is fully backward compatible and will run all your existing tests created with Squish 3, so no changes to your tests or to your testing procedures are necessary.
Although Squish 4 maintains backward compatibility, the new version includes a lot of new features and additional functionality that should help ensure that your testing is more efficient and reliable than ever before.
Tip | |
---|---|
The Beta Edition is designed to provide a complete preview of Squish 4.0-final and to help Squish users familiarize themselves with Squish 4, but may not be as stable as the final release. It is also hoped that users will provide feedback to help ensure that when Squish 4.0-final is released, it will have all the functionality that our customers want, as well as being a solid and reliable tool. |
The most notable improvements available in Squish 4 compared with Squish 3 are listed below. In addition, Squish 4 has numerous bug fixes and usability and feature enhancements, too many to mention here.
One of the most visible and dramatic changes is that Squish 4 (which we'll refer to simply as Squish from now on), now provides two IDEs:
This is a stand-alone IDE built using the Eclipse libraries, and sharing many of Eclipse's features and advantages.
This is a version of the Squish IDE that is provided with Squish 3. Since the New IDE has far more features and functionality overall than the Classic IDE, the Classic IDE may eventually be phased out.
The New IDE offers considerable improvements over the Classic IDE:
Vastly improved functionality for script editing and debugging compared with the Classic IDE.
Much more streamlined workflow for recording, inserting verifications, spying, editing, and debugging. One of the most frequently requested features has been implemented: the ability to insert Verification Points while a script is being recorded.
Lots of integrations—for example, with version control systems.
More powerful and capable Object Map Editor including a search facility and more understandable and flexible ways of viewing the object map.
The ability to share scripts globally (in addition to the existing
ability to share scripts within a test suite), by setting the
SQUISH_SCRIPT_DIR
environment variable.
A much more convenient set of script commands to automate the user interface of applications is available. (The old commands remain available and supported to ensure that existing tests continue to function correctly.)
Much shorter recorded test scripts. This is achieved by using the object
returned by calls to waitForObject()
. For example, the two
separate statements waitForObject(":OK_Button")
and
clickButton("OK_Button")
become a single statement with just
one object name lookup:
clickButton(waitForObject("OK_Button"))
.
The waitForObjectItem()
function offers much more
convenience. It now returns a reference to the item—this can be
passed to other functions, such as mouseClick()
.
Significantly faster test script execution. This is partly as a result
of recording shorter test scripts and partly the result of additional
internal optimizations. (One consequence of this improvement is that
scripts that don't use proper synchronization—e.g.,
waitForObject()
and similar—may need to add a
synchronization call to be timing independent.)
The items that are contained inside container objects (e.g., list items
inside lists, cells inside tables, and tree items inside trees), and now
treated as full-blown objects in their own right. This makes them much
more convenient to access. Thus, a table cell can now be accessed
either using its row/column, or by text matching (including using
wildcards)—for example, waitForObjectItem(":A_Table",
"5/3")
returns the item at the fifth row and third column of the
given table.
Greatly improved recognition of native Windows controls when creating Qt, Java, and Web tests.
Hudson integration so that Squish tests can be run from the Hudson continuous integration framework. (See installation instructions.)
Improved packaging to make a clear separation between those components that are common to all Squish editions, and those components that are specific to particular editions.
Improved and restructured manual. The User Guide is now much more task-oriented and features far more examples, including those that show how to access and test items in list, table, and tree widgets in Qt and Java AWT/Swing and Java SWT applications, and using all of the scripting languages that Squish supports. Reference material that was formerly in the User Guide has been moved into the Reference Manual. (The manual is still being improved and enhanced and this will continue as an on-going process.)
A huge number of improvements have been made to the wrappers that Squish uses to interact with the underlying GUI toolkits.
Squish for Win32 Edition—New Edition
This new edition can be used to test native Windows GUI applications that use MFC, .NET, and similar technologies.
This edition includes an extension mechanism to make it possible to create plugins to support the testing of third party controls.
Support for testing embedded web content from embedded Microsoft Internet Explorer controls, by providing access to the content's DOM and HTML. (This feature may not be ready for the first Squish 4 release.)
Squish for iPhone Edition—New Edition
This new edition can be used to test GUI applications that are built with Cocoa Touch, whether running in an iPhone simulator or on an actual iPhone device. See press release.
Squish for Qt—Improved and Enhanced
Additional support for testing Qt applications on embedded devices—for example, for Maemo devices. (Squish already has support for testing Qt/Embedded and Qtopia applications.)
Tests can now access the slots and properties of custom AUT widgets without needing to create a custom application-specific bindings wrapper. (Behind the scenes Squish automatically creates bindings to the AUT's classes.)
Greatly improved support for QGraphicsView
, including
support for widgets displayed inside the graphics view.
All items—menu items, list items, table cell items, tree
items, etc.—can be accessed like any other script-accessible
object. This makes it possible to pick individual items in the Spy
and to be able to use Squish's standard functions (such as
findObject
and waitForObject
) on them.
An extension mechanism that supports the creation of plugins with dedicated support for third party controls.
Support for testing embedded web content from embedded Microsoft Internet Explorer controls, by providing access to the content's DOM and HTML.
Support for testing embedded web content from
QWebView
s, by providing access to the content's DOM and
HTML. (This feature is not yet enabled in the first preview
version.)
Squish for Java—Improved and Enhanced
Tests can now access objects of any class used by the AUT without the need to register classes that are not wrapped by default. (Behind the scenes Squish automatically creates bindings to the AUT's classes.)
All items—menu items, list items, table cell items, tree
items, etc.—can be accessed like any other script-accessible
object. This makes it possible to pick individual items in the Spy
and to be able to use Squish's standard functions (such as
findObject
and waitForObject
) on them.
Support for testing embedded web content from embedded Microsoft Internet Explorer controls, by providing access to the content's DOM and HTML.
Table of Contents
One important difference from earlier versions of Squish is that Squish 4 makes a clear distinction between the underlying command line tools that record and run tests, and the Squish IDEs. All of Squish's IDEs use the command line tools under the hood to ensure complete consistency.
When Squish 4.0-final is released it will be available as a single installable package from which you can choose the GUI toolkits you want to test (depending on what you have licensed), and which IDE you want to use. But for the Beta Edition, you will need to download two packages: the command line tools package (this is the normal Squish package you have downloaded for previous versions), and then the package for the New IDE.
The command line tools must always be installed before the IDE, and the process is just the same as for earlier versions. This process is described in the main manual, How to Install Squish. (The command line tools also include the Classic IDE, but using the New IDE is recommended.) It is essential that you run the setup program to properly configure Squish before installing the New IDE.
Once the command line tools are installed you can use the IDE package to install the New IDE. If you want to use the New IDE (squishide), you must have a Java Runtime Environment (JRE), or a Java Development Kit (JDK), or both, installed on your machine (Java 1.5 or later). During the installation of the IDE you'll be asked for the path to where the Squish command line tools are installed, so keep a note of what that path is.
The New IDE is provided in a ZIP file called
SquishIDE-version.zip
. The
version
may vary, but will include
text that identifies its target platform (“win32”,
“macosx”, and so on). Download the ZIP file that is
appropriate for your platform and then follow
the platform-specific installation instructions given below.
Once the IDE package is downloaded, unzip it in any convenient directory. You can probably uncompress the package using Window's built-in utilities. Start Windows Explorer and navigate to the directory that contains the IDE package. Right-click the package, and if you get an WinZip and the open source UnZip from the InfoZip project.
option, click the option and use the Windows Extraction Wizard to uncompress the IDE package to the directory of your choice. If you don't have this option, you will need to obtain a ZIP uncompression tool. Several such tools are available, including the commercial
Make sure that you have a Java Runtime Environment or a Java Development
Kit installed (Java 1.5 or later), and that
javaw.exe
is in the %PATH%
.
The New IDE's executable is in the unzipped directory's root and is called squishide; it can be run straight away from a console window:
C:\> cd squishide C:\squishide> squishide.exe
For regular use you might prefer to create a shortcut to the executable from your
menu or from your desktop.The First Time the New IDE Runs | |
---|---|
The
first time the IDE is run it will ask you to choose the directory
where the Squish command line tools are located. Please choose its
toplevel directory that contains the Depending on your security settings, Windows might pop up a dialog asking if you want to allow or block the squishserver from running. If you get this dialog, you must choose for Squish to be able to function correctly. |
Once the IDE package is downloaded, unzip it in any convenient directory. (If you don't have unzip, install it using your system's package management tool.)
Make sure that you have a Java Runtime Environment or a Java Development Kit installed (Java 1.5 or later): use your system's package management tool to install one of them if you don't have one installed already.
The New IDE's executable is in the unzipped directory's root and is called squishide; it can be run straight away from an xterm:
$ cd squishide $ ./squishide &
The First Time the New IDE Runs | |
---|---|
The first time the IDE is run it will ask you to choose the directory where the Squish command line tools are located. |
Once the IDE package is downloaded, unzip it in any convenient directory.
Make sure that you have a Java Runtime Environment or a Java Development Kit installed (Java 1.5 or later). On modern versions of Mac OS X one of them should already be present—if not, try installing Xcode.
The New IDE's executable is in the unzipped directory's root and is called squishide; it can be run straight away from inside a Terminal.app:
$ cd squishide $ open squishide.app
The First Time the New IDE Runs | |
---|---|
The first time the IDE is run it will ask you to choose the directory where the Squish command line tools are located. |
The Beta Edition is an almost complete version of the Squish 4 toolset. However, some aspects of it are subject to change, and there are some caveats regarding its use, as described below.
Tip | |
---|---|
Although test scripts which are created in the Beta Edition of Squish will work with Squish 4.0-final, we do not recommended using the Beta Edition for production use since it may not be as stable as Squish 4.0-final will be. |
The documentation supplied with the Beta Edition, including the User Guide and the Reference Manual—but not including this document—are still in the process of being updated. Almost everything in Squish 4 works the same as before since the new version is backward compatible, but not all the new features are documented yet, and most of the screenshots still show an older version.
The menu options, toolbar buttons, and context menus have changed—new features have been added, and existing features have new icons and in some cases have been moved to different menus or toolbars. All the menu options and toolbar buttons have tooltips, so it should be quite easy to reorient yourself to where everything is.
The new script editors provide breakpoint markers that automatically move if lines are inserted or deleted. Unfortunately, an as yet unfixed bug prevents the internally stored position from being updated correctly. This can cause a mismatch between visual marker location and where the breakpoint actually is.
Newly created test suites will record a different application startup
sequence by default: instead of automatically launching the AUT before
the main()
function is invoked, a
startApplication()
statement will be recorded as the first
statement. The old behavior can still be enabled (see the suite's
Settings), but the new behavior is more flexible since it allows the
insertion of initialization statements before the application is
started.
To run a single test case, right click the test case and choose the all of a test suite's tests, right click the test suite and choose the context menu option. (In fact, this will run the “active” tests—to make test cases active or inactive click the suite's item, scroll down to the Active Test Cases list, and check any that you want to be active, i.e., to run when all the suite's tests are run.)
context menu option (it is the last option in the menu). And to runRecording multi-application tests—that is, tests that involve interacting with more than one application—does not work correctly when done from the IDEs.
Note for those new to Eclipse-style IDEs | |
---|---|
The New IDE, works just like the Eclipse IDE. This provides a much more sophisticated user interface than the Squish Classic IDE. If you aren't used to Eclipse it is crucial to understand one key concept: Views and Perspectives. In Eclipse (and therefore in the new Squish IDEs), a View is essentially a child window (perhaps a dock window, or a tab in an existing window). And a Perspective is a collection of Views arranged together. Both are accessible through the menu. The Squish IDE is supplied with three Perspectives—Squish Test Management (which is the Perspective that the Squish IDE starts with), Squish Test Debugging, and Squish Spy. You can change these Perspectives to include additional Views (or to get rid of any Views that you don't want), and you can create your own Perspectives with exactly the Views you want. So if your windows change dramatically it just means that the Perspective changed; you can always use the menu to change back to the Perspective you want. Other than this, the Squish IDE works in a very similar way to the Classic IDE, although it has a lot more features, and is easier to use once you've got used to it. The screenshot shows the Squish Test Management perspective, with the Squish Project view, a code window view, and the Results view. If we were to add the Squish Server Log view, in this particular case it would be added as a new tab at the bottom along with the Results View. |
If you encounter problems with the Beta Edition, or if there are missing features (apart from those mentioned above), please let us know using your usual froglogic support email address squish@froglogic.com.
Here is a summary of the changes that have been made since the Technical Preview editions and which are incorporated in the new Squish 4.0-beta1 editions.
Added a new squishserver --verbose
option to make it
easier to debug connection problems involving remote hosts.
The Squish IDE no longer crashes if it's asked to display a reference to a non-existent Perl function.
The Spy's tooltip colors no longer conflict with the AUT's palette.
The Squish IDE is much more robust when property accesses to null
objects are attempted.
The Squish IDE is no longer has startup errors if .ini
configuration files are missing.
The waitForObject()
and
waitForObjectItem()
functions can now accept
an object name (as before) or an object reference (new) as their first
argument.
The execution of waitForObject()
function calls
has been speeded up by eliminating one call round-trip between
squishrunner and the AUT. (And newly recorded scripts are faster
anyway.)
The waitForObjectItem()
function returns a
reference to the item rather than the object that contains the
item—for example, it returns the relevant table cell item rather
than the table.
If the source()
function was used in Perl
scripts that had one or more breakpoints, the filename and line number
reported by the Squish IDE could be wrong; these problems have now been
fixed.
Squish no longer crashes if the test script has incomplete or
syntactically incorrect switch
statements.
Squish no longer crashes if a JavaScript test script attempts to access results on a closed SQL query.
The JavaScript SQL result object's toFirst()
,
toNext()
, and value()
methods no longer
produce spurious warnings.
The waitForObject()
function now uses an improved readiness
check for Web objects.
JavaScript error reporting in Internet Explorer has been improved.
Squish now provides access to the computed/cascaded style values in HTML elements' style properties. This ensures that the values retrieved correctly reflect the actual state of the elements in the web page.
Fixed a bug relating to setText()
calls on file upload
elements on Mac OS X (for Firefox 3 and Safari).
Fixed a bug with Spy highlighting when using Firefox and Safari on Mac OS X.
The setup program now enforces the selection of a usable Firefox version to work around problems with Firefox 3.5.2 and later.
QIconView
items are now accessible as objects with
properties and geometry.
The waitForObjectItem()
function when applied to a
QTable
returns an object representing a particular
cell item—or raises an exception if no cell item is matched.
The cell item object can be used like any other object, for example, by
passing it to the mouseClick()
function.
When the waitForObjectItem()
function is used on a menu it
waits for the specified menu item to become available, i.e., visible and
enabled.
If the activateItem()
function is called on a disabled
item, an exception is thrown.
If the native GUI style requests that clicking a button should move the
keyboard focus to the button, the clickButton()
function
will honor this.
Squish no longer crashes if a QLabel
had directly or
indirectly set itself as its own buddy.
Conversions to and from the C++ Standard Library's
std::string
type have been added.
Script bindings for Qt 4's QMovie
class have now been
provided. (They were missing originally because of a function name
conflict.)
Squish no longer crashes if a non-QWidget
argument is
passed to the waitForObjectItem()
function.
The RTTI (Run Time Type Information) of QListViewItem
s is
now exposed as a Spy property.
Replaced the new changeWindowState()
function that was
introduced in the Technical Previews with a better
setWindowState()
function which takes an object name or
reference and an enum
(such as
WindowState.Maximize
).
Fixed a bug that occurred when hooking into Eclipse/RCP 3.5-based applications.
Fixed a bug in the dragAndDrop()
function where if the
target was given as an object name rather than as a reference it could
be incorrectly handled.
Fixed the recording of mouse clicks and double-clicks on SWT Tables, when the clicks were not on table cell items—for example, if the top-left corner of the Table was clicked.
Fixed a problem with text escaping that affected SWT Combo and List items.
Added MessageBoxOpened
as a possible option for the
installEventHandler()
function. If this option is used, the
event handler will be called when a native SWT message box is shown.
Here is a summary of the changes that have been made since the Technical Preview editions and since the Squish 4.0-beta1 editions, and which are incorporated in the new Squish 4.0-beta2 editions.
The --testsuite
squishrunner mode no longer uses the
obsolete --hook-subprocesses
option.
If the obsolete --hook-subprocesses
option is used a
warning is issued—previously, use of it caused an error.
Qt edition—Fixed internal method
offsets for proper access to dynamically bound QObject
slots.
Mac edition—Added a new
WindowOpened
event handler.
Introduced a new version check that will allow the mixing of different versions of squishserver and squishrunner so long as they are considered compatible.
Fixed creation of Screenshot Verification Points on Windows.
Allow opening of test suites that do not have a suite_ prefix.
Fixed copying of Real Names from the Application Objects tree.
The New Squish Test Suite Wizard no longer finishes too early.
JavaScript source code formatting is now available.
Debugging is properly shutdown when Launch is finished.
Reduced the CPU load when waiting for the AUT to be launched.
Fixed miscellaneous problems with filenames retrieved from the script debugger.
Prevented a Null Pointer Exception occurring in editor context menus.
Fixed toolkit selection and validation in the New Test Suite Wizard.
Improved the error message when suite.conf
is
opened via
→ .
Fixed the exception that occurred when the Choose Object Map File dialog in the Test Suite Settings editor is canceled.
Newly added objects are selected and revealed in the object map editor.
Here is a summary of the changes that have been made since the Technical Preview editions and since the Squish 4.0-beta1 and Squish 4.0-beta2 editions, and which are incorporated in the new Squish 4.0-beta3 editions.
Added a JavaScript getAttributeNames()
function to the
JavaScript XML object.
The installEventHandler()
function that accepts object
types as arguments has had two improvements. First, it respects derived
classes, and second it can also be used with types that are registered
dynamically, even if the registation occurs after the AUT has started.
Python and Tcl functions that return Unicode values now work correctly in the script console.
Added a JavaScript File.separator
property that contains the
platform-specific separator for components of a file path (e.g., "\" on
Windows).
The setApplicationContext()
function now throws an
exception if an attempt is made to use it to switch to the context of an
AUT that has already terminated.
When accessing SQLite databases using the JavaScript SQL object, there is no need to specify a username. Also, for all database drivers, the Host parameter now defaults to "localhost".
Fixed the nativeType()
function so that it always correctly
handles key combinations involving the Alt key on
Windows.
Fixed the type()
function so that it always correctly
handles key combinations involving the Alt key on
Windows.
Squish can now be built from source using Microsoft Visual Studio 2010.
Support for the QtWebKit
module has been completely
reworked. Now QtWebKit
HTML objects are treated rather like
standard QObject
s, (i.e., as children of their parent
widget), so they can now be accessed much more easily.
Made the startaut tool work even if the
SQUISH_LIBQTDIR
environment variable isn't set on
Unix-like systems.
Fixed the replaying of items in QComboBox
es where it is
necesary to scroll to reach them.
Squish no longer interferes with QEvent
s in non-GUI
threads.
Added support for wildcard matching for QGraphicsItem
s.
Fixed the details of Qt key events that are triggered by calls to the
type()
function.
Added support for typing a Control key by itself, e.g.
type("<Control>")
.
It is (once again) possible to disable the hooking into sub-processes started by the main AUT since this is still useful in rare cases.
Made the startaut tool start the application for the correct architecture on Mac OS X 10.6 (Snow Leopard).
Added support for whitelisting the AUTs that Squish can hook into. This means that Squish will only hook into applications that are started by the AUT if they appear in the list of registered AUTs. If you have relied on Squish hooking into all your AUT's sub-processes, you must now register those applications as AUTs in their own right to get the same behavior as before.
The waitForObject()
function can now be used with
views and windows. In addition, the waitForObject()
function's logic has been improved (to match other toolkits) so that it
not only finds the given object, but in the case of controls, waits for
the object to be visible and enabled.
Added support for recording and playing back interactions with Cocoa sub-menus.
Redesigned Test Suite View. A suite's content is now shown in a more compact manner with run (play) and record buttons directly integrated into the view. The checkboxes for disabling individual test cases have been moved into the suite view from the settings page. An extra button has been added to make it more convenient to run a single test case.
The active suite is now remembered between sessions
The SQUISH_USER_SETTINGS_DIR
environment variable that is
understood by the other parts of the Squish tool chain is now
respected by the new Squish IDE.
Text in the .tsv
editor is now word-wrapped if
necessary. This makes it much easier to edit longer texts.
Added a Default Web Browser settings page.
Newlines are now replaced with ellipses in the test results view.
The 'Error loading suites' dialog now provides more helpful diagnostics.
A test suite's suite.conf
file's
TEST_CASES
variable is now respected, thus preserving the
order in which the test cases are listed in the Squish IDE.
Whenever a breakpoint is reached the Squish IDE switches to the Debug perspective.
The reporting of internal errors has been improved.
The Squish IDE no longer forces the use of specific editors for test resource files.
Fixed several problems related to the enabled/disabled state of toolbar buttons and menu items in the Squish IDE.
The Squish IDE now gracefully copes when it starts up and discovers that a test suite has been moved or deleted on the disk outside of the Squish IDE.
Added support for disabling and enabling logging options to match the functionality provided by the classic IDE via the
→ menu option.The workspace is correctly saved when the Squish IDE is terminated.
The Squish IDE can now use the Perl interpreter shipped with Squish to improve the editing of Perl scripts.
The runner and server log views have been merged into a single view.
Fixed the enabling of context menu items in the Object Map editor.
Added a context menu item to allow copying from the Summary view.
Fixed a bug with variable watching that sometimes affected deeply nested variables.
Reworked the dialogs for the creation of testdata and script files. The user can now choose the suite and testcase where they want to create the file, with the dialogs taking their defaults from the suite view's current selection.
Improved the error handling where an attempt is made to create a suite with a name that already exists in the directory.
Fixed squishrunner hangs that could occasionally occur during test execution.
Fixed an ordering mix-up that could occasionally occur in test log entries.
Fixed cases where recording stopped working after errors occurred during a test run.
Fixed the "Scriptify VP" feature.
Fixed exceptions that were caused by race conditions during the disposal of user interface controls.