Squish for Qt: Execute Shell-Like commands on Remote Host

August 16th, 2007 by Rainer Schmid

Important: The following information applies for Squish for Qt only.

Squish allows you to do remote testing with the squishrunner running on one host and squishserver (that starts your AUT) on another host. The script interpreter is living in the squishrunner process. So all script commands are executed on the first host and not on the second host that is running your AUT. Only Qt objects (and function you execute on them) are forwarded to the second host and are executed there.

So if you create e.g. a Python file object in your test script, you can only access the file system of the first host. But if you create a QFile object, you can actually access the file system of the second host. But for this to work, the AUT has to be running. And you need some knowledge of the Qt API.

In froglogic we use a dummy application that provides simple shell-like features that are actually executed on the remote host. So if you need such a functionality, read on to find out how to use this in your own test setting.

Read the rest of this entry »

Finalized return from aKademy

July 12th, 2007 by Harri Porten

This year’s KDE conference was again worthwhile going to. Wish I had been able to stay longer. Talks were good and seeing familiar and new faces proved to be very nice again. I might be in the minority but in my opinion the initial lack of an Internet connection was a good thing. It made people talk to each other or closely listen to a presentation rather than staring at their screen and using IRC to chat with people elsewhere or inside the same room.

Everything would have been perfect if I would not have to add three more people to the list of those that commenced their stay by filing a Property Irregularity Report at Glasgow Airport.

Read the rest of this entry »

Java Forum Stuttgart

July 6th, 2007 by Reginald Stadlbauer

Yesterday we attended the Java Forum Stuttgart (JFS), a Java conference organized by the Java User Group Stuttgart e.V. We had a booth there where we presented Squish and I also gave a talk.

Lately we have been to quite a few conferences. The JFS really was one of the best organized conferences we have been to. The attendees were really technical and automated GUI testing was of big interest. We got a lot of interest at our booth so that at times people had to wait while Frerich and I answered questions of other visitors. From the questions we got we could judge that our visitors had seriously thought about automated GUI testing before and real concrete interest.

I also gave a talk which was well attended as well and ended with many interesting and good questions.

I really also need to say a few words about the excellent organization. At my talk I was heartly welcomed, got help with the setup and a moderator introduced me to my audience. At other conferences I have been to, nobody from the origanizers was present at the talks and I as the presenter had to do everything myself which always feels a bit odd.

Also one thing I really appreciated was that there was a separate lunch for exhibitors before the official lunch for the visitors. Why is this so great? During the breaks (coffee, lunch, etc.) people walk the floor and visit the booths. So those are really the times where you HAVE to be at the booth. This means you usually get no chance to eat lunch during the lunch break because you are busy talking to visitors and the catering service removes anything eatable immediately after the break. So it was great to have a good and relaxed lunch for the first time and a conference :-)

In summary, it was a well-done conference and we’ll surely be there next year again.

Oh, and as it turns out, the taxi drivers in Stuttgart really like to talk a LOT. It was really entertaining but I also enjoyed the silence in the taxi we took back from the airport in Hamburg at the end of the day :-)

Carbon/Cocoa Inter Thread Communication

July 3rd, 2007 by Rainer Schmid

Apple has a nice overview of thread communication means in their multithreading documentation (for both, Carbon and Carbon). However, I think the documentation is missing another technique that is very simple.

Read the rest of this entry »

Squish for Qt: combine source and binary package

July 2nd, 2007 by Rainer Schmid

Squish for Qt is available as a binary package and a source package. The binary package is available for common platforms and compilers, but sometimes the Qt version you need is missing. Or maybe it is there, but it was built with a Qt configuration that does not match the Qt version you use in your project. In all these cases, you have to use the source package and build Squish yourself.

This might be hassle since you need to install the wanted scripting languages, e.g. This becomes even more of a problem if you want to build Squish on one machine and use the one build on many other machines (because the scripting languages have to be installed on that machine as well).

The advantage of the Squish binary package in this respect is that all is already packaged.

It becomes even worse if you are in the unlucky situation that you have to do a split build of Squish because your applications Qt version is that old that some parts of Squish does not support it (e.g. testing Qt 3.0 applications) or if your application is using a single-threaded Qt library.

So wouldn’t it be nice if you could just use the ease of installation of the binary package together with the flexibility of the source package? Well, you almost can.

Read the rest of this entry »

4th Anniversary

June 29th, 2007 by Reginald Stadlbauer

In two days our company froglogic will have it’s 4th anniversary. The past 4 years have been very exciting times for us.

Harri and I started the company in July 2003 (the hottest summer I can remember), after just having relocated to Hamburg. At this time the economy was still rather bad and I remember some pessimistic comments from the lady at the counter when we registered the company.

We started by working out of a small room in Harri’s apartment and our only start-up investment were 2 computers so we could start developing Squish. I coincidently found a design overview document of Squish which I wrote back then, so I thought I could as well post it here as attachment :-)

We continued working in this setting for quite a while and it was good to see that Squish (for Qt only at this time) really started taking off in spring/summer 2004. Beginning of 2005 we felt confident enough that Squish will keep growing, so we finally moved into small offices and hired our first employee in May 2005.

The number of employees, our revenue and profit kept growing organically and we moved into bigger offices around Easter 2006. At this time we also started extending Squish for more technologies, such as Web testing and Java testing.

In a month we will move into new offices yet again since Harri and I had to move into the conference room already due to too little space in our current office.

I’m looking forward to the coming years and further growth. I’d also like to take the chance to thank all our customers, users and partners for their support and trust in us in the name of the froglogic team.Squish DesignSquish Design

Programmer’s beverage

June 26th, 2007 by Rainer Schmid

Most programmers have a favorite beverage they like and need for programming. For some it is coffee and for others it is some cola brand. I was never one of these: I always preferred tea over coffee (and I know quite a bunch who prefer tea as well).

Here at froglogic’s office, people really like Bionade. I never liked it. But luckily our supplier recently ran out of it and it was not available when Harri was doing his order. So he tried something new: Club-Mate

The correct pronounciation of it seems to be the “German” way, i.e. [ˈklup ˈmaːtə] and not the English way [’klʌb meɪt]. The reason is that Mate has nothing to do with English word for a friend, but with the South American mate tea. And Club-Mate is basically an ice-tea variant made of mate tea.

Well, to make a long story short: I am now addicted to this stuff. The first sip I did was awful, but after finishing the first bottle I reluctantly tried a second one. And after that, I started to really enjoy it. This seems to be quite common: somewhere on the web I read that it is like starting to smoke — nobody enyojed the first cigarette either. (But the good thing of Club-Mate seems to be that it is rather healthy, contrary to cigarettes.)

The good thing is that only Harri and me got around the first sip and nobody else in the office is enjoying it. So we don’t run out of it that often. But just now I am drinking the last bottle, hoping that Harri placed an order for more.

Oh, I just notice that my build finished. So back to work for me. And what is your favorite beverage for programming?

Complex Testdata in Squish

June 25th, 2007 by Rainer Schmid

Squish has support for testdata: you can specify a tab (or comma) separated list of data, store it in an external file and iterate over each line of it with its scripting API (and access the fields of each line). Squish also has a builtin editor to edit such testdata.

So with Squish it is easy to have testdata you can store in a table. However, when I write a test I have the need to have more complex testdata; testdata that can’t be easily represented in a table (e.g. data where one field would be a list again). Am I lost? No.

Read the rest of this entry »

Extending the script bindings for Java

June 12th, 2007 by koos

Testing with the Squish Qt edition, one can add (from the Squish documentation)
var num = QInputDialog.getInteger( "Require User Input", "How many pages have been printed?" );
in the scripts. So testers can fill-in data that the program can’t see.
Unfortunately testing with the Java edition and using the SWT toolkit, there is no such a ready-to-use dialog for this.

However, the Java edition of Squish is easily extended because classes are dynamically wrapped at application startup. We must therefor write an input dialog ourselves, tell Squish about it and call it from our test scripts.

So first write a simple input dialog

package com.froglogic;
import org.eclipse.swt.widgets.*;

public class Input
{
public static String getMessage( Shell parent, String question ) {
...
}
}

The implementation is in the input.zip file, together with a jar file containing the compiled classes of the sources.

Now we must add the .jar to our classpath. (Btw. Squish 3.2.1 will now finally have an editbox for setting the classpath and main class in the testsuite settings dialog.)

Next we must tell Squish that we want to wrap the new classes. So we must carry out the task “Wrapping custom Java™ classes” from the Squish User Guide.
Basically write a .ini file, like:

[general]
AutClasses="com.froglogic.Input"

and register this by squishserver:

squishserver --config setConfig MyAUT /path/extras.ini

Finally use the code in our scripts. I’ve put it here just after the script is waiting for a CCombo widget:

var shell = findObject(":Buttons_org.eclipse.swt.custom.CCombo").shell;
test.log(com_froglogic_Input.getMessage(shell, "What's your name?"));

In the code above the return value is directly printed in the test results.
Note that the property CCombo.shell is a synthetic property, I’ve could have used CCombo.getShell() as well.

Summarizing, it requires some work but it is not very hard and without modifying any code of the application we’re testing.

Webinale

May 23rd, 2007 by Frerich Raabe

Today’s the third, and last, day of our stay at the Webinale Conference. Squish is still a rather new and unknown contender in the AJAX world but it turned out that this is not a disadvantage. In fact, the whole scene is moving so quickly that there’s always something new (sometimes useless and over-hyped, sometimes interesting) and something else is outdated.

One nice thing about this conference is that even though there are a few vendors of AJAX Toolkits here, and lots of talks about how to write proper web applications, nobody cares about testing those GUIs yet. We’re the only ones to tackle that topic and hence get a very good amount of attention here by the visitors. Reggie’s talk was also received very well and even though the conference is rather smallish (this is the first year it’s taking place), we managed to get hold of a good number of leads (which, by the way, are of rather high quality - most people here already thought about testing, tried other testing solutions, and are generally everything but new to the topic).
Read the rest of this entry »