Automated Testing of Qt User Interfaces (Feb. 2009)
froglogic's founders demonstrated the popular Squish for Qt product
for automating GUI tests of Qt applications on different
platforms.
Besides general Qt UI testing, this webinar covered testing new and
advanced Qt controls, such as Qt WebKit and QGraphicsView.
A recording of the well-attended webinar can be found under http://www.froglogic.com/download/webinar_qt_0209.wmv.
Here you can read the questions which have been asked at the end of
the webinar as well as the answers from froglogic.
Q: Our application allows two users to communicate with each
other. How do we create tests that simulate two (or more) users who
are using the application at the same time?
A: You can start multiple applications from one test script and
interact with all of them. Please also see this
chapter in the Squish manual for details.
Q: Can I run a test I created with Squish on different
platforms?
A: Yes, Squish itself and all test scripts created with Squish are
cross-platform.
Q: What modifications must be done to my application in order to
make it testable with Squish?
A: No changes need to be done to your application. Squish is a
non-intrusive test tool allowing you to hook to your application
without any special preparations.
Q: Can squishserver handle multiple connections at once?
A: Yes, you can have multiple squishrunners or applications
connected to one squishserver.
Q: Is it possible to verify OpenGL content? For example, verify
the contents of a 3D model viewer of some kind?
A: Yes, you can record and replay interactions on an OpenGL widget
and also access the API to verify the data model behind it from test
scripts.
Q: What about the object map when changing the object name of,
say, a button? What when changing the object name of its parent
widget? Will the object map mess up?
A: No, the object map will keep track of any such changes and deal
with it in a reliable way.
Q: Is it possible to test the contents of QAbstractItemModel
subclasses connected to any ItemViews?
A: Yes, you can access the complete Qt API from Squish test
scripts.
Q: If you share script functions accross multiple test suites, how do you handle the object map?
A: The object map can also be shared accross multiple suites.
Q: What is Squish's price and licensing model?
A: Please have a look at our price and
licensing page.
Q: Can you access Oracle databases from a test script?
A: Yes, with Squish's script languages you can access different
database types, read and write files and do much more.
Automated Java GUI Testing with Squish (Sept. 2008)
froglogic's CEO
demonstrated the popular Squish for Java edition in a live
webinar. The demonstration covered test creation, test maintenance,
automated execution as well as many tips and tricks for testing Java
Swing/AWT and SWT/Eclipse RCP applications.
A recording of the well-attended webinar can be found under http://www.froglogic.com/download/webinar_java_2008.wmv.
Here you can read the questions which have been asked at the end of
the webinar as well as the answers from froglogic.
Q: How can you manage the Squish scripts efficiently so that
some might be reused in several tests?
A: You can create script libraries with re-usable script
functions. You can read this up in the on-line
manual.
Q: Is there 64 bit version of Squish?
A: Yes, Squish works on 32 and 64 bit systems.
Q: Should the client (squishrunner) and server (squishserver and
AUT) run on the same OS? Can Linux and Windows machines be used
simultaneously?
A: Since Squish's communication is TCP/IP based, squishrunner and
squishserver can be running on different operating systems. You can
also run tests simultaneously across machine and OS
boundaries.
Q: Is it possible to test Eclipse IDE functionality with Squish,
like Eclipse CDT?
A: Yes any Eclipse/RCP-based application or plugin can be
tested. We actually have customers testing Eclipse CDT with
Squish.
Q: What types does the function findObject() return and how can
one know how to "handle" that type?
A: findObject() returns an object reference to the real Java
object (or Qt object/DOM/etc. for other Squish editions) which has
been identified using the name you passed to findObject(). It's then
possible call any of the functions or query a property as defined in
the object's Java class (e.g. JTable API of you access a JTable via
findObject())
Q: Can you tell us something about integration with Ant?
A: You can read that up in our on-line
manual.
Q: If I don't want to pick each element, is there a method to
determine names "in advance" ?
A: Yes, since real object names are just property-value lists, which
you can represent using a string, you can dynamically compose the
names in scripting.
Q: Does Squish support GEF?
A: Yes, Squish has dedicated GEF support.
Q: Is it possible to change the system clock in Windows during a
test?
A: You can call external tools using Squish's scripting support which
also allows to change the system clock.
Q: Is it possible to call methods for example from the AUT's public interfaces?
A: Yes, Squish provides a complete script binding to the Java VM via
the Java introspection. So everything which is accessible as Java
public interfaces (all classes, their API, etc.) can also be accessed
from Squish test scripts.
Q: Is Squish expected to include any other scripting language such as Ruby in the future?
A: Yes, we will add support for more languages over time.
Q: Can you explain more in detail how Squish can be include in
tools such is CruiseControl?
A: You can read that up in our on-line
manual.
Q: Is screenshot capturing and comparison supported for Squish
Java Swing?
A: Yes, all Squish editions also support screenshot
verifications. See out on-line
manual for details.
Q: Is the converter of XML test reports to html included in the
Squish distribution?
A: Yes, it is included in the example folder and also documented.
Q: Object items can be edited via the Object Map in the IDE; can
the same effect be achieved easily via scripting only?
A: Yes, you can access the object map via script API and also
dynamically generate object names.
Q: Do you provide training?
A: Please have a look at our service
page.
Q: Does this tool utilize the Sun Robot?
A: No.
Q: What happens when one of your waitFor* actions does not work?
A: By default, after 20 seconds a time-out is hit which leads to a
script error. The timeout can be changed in order to adjust it to your
application's needs.
Q: What does this tool do in the case that it finds non-unique
components? Does it error? Return a vector of components?
A: Using a special occurrence property in the object name it is
possible then define which of the objects matching the other
properties shall be used.
Q: How do you handle things like table cell editors and renderers?
A: Squish has dedicated support for such complex
controls.
Q: Is there a mechanism to extend abilities for custom widgets?
A: Yes, please see the extension
API documentation for details.
Q: Do you support JIDE components?
A: Yes, Squish includes dedicated support for JIDE
controls.
Q: Is there a cost for on-going support as well?
A: Each purchased license includes 1 year of support &
updates. After that you can renew the support & updates agreement on
an annual basis.
Q: Do you have any customers who use Squish to automate their
Eclipse applications? If yes, how are their experiences?
A: Yes, many of our customers create and run automated tests for
Eclipse-based applications with Squish. The feedback is very positive
as Squish comes with dedicated support for the Eclipse RCP framework
which sets it apart from other GUI testing solutions.
Q: What support to you have for .NET?
A: We have basic support for Win32 controls built in
already. Beginning of next year we will also release a dedicated
Squish edition for testing native Windows applications such as
.NET.
Q: Can you run automated Squish tests in a silent mode?
A: You will need some sort of display for your application. But
this can also be an emulated display such as the Xvfb or Xvnc
X11-Server, which emulates a display in memory. So there are several
solutions to run automated tests with no real GUI display.
Q: How is your product is different from other products such as
QTP?
A: There are several advantages of Squish for Java GUI testing
such as cross-platform support (Windows, Linux/Unix, Mac OS X),
dedicated support for Java toolkits (which allows you to create much
more robust and sophisticated tests) and use of open script languages
(instead of a proprietary vendor language).
Q: Is it possible to run an Eclipse based application and then a
Web application that share data and interact and go back and
forth?
A: Yes, Squish allows to run and control multiple applications
from one test script. By using the Java and Web editions in a pair the
envisioned scenario is possible.
Q: Is there a way to check the existence of the item within the
object during the test?
A: Yes, the waitForObjectItem() function performs this check.
Q: waitForObjectItem() fails the test if the item is not found
within the timeout. I would like to have a conditional run of the test
depending of the item's existence. How can I do that?
A: You can use an exception handler to handle the exception thrown
by waitForObjectItem() or the generic waitFor() command.
Q: Your product is amazing, the support you provided is
impeccable, and on behalf of the eclipse team here at iWay, bravo
man!
A: Thank you for the praise :-)