Archive for June, 2007

4th Anniversary

Friday, June 29th, 2007

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

Tuesday, June 26th, 2007

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

Monday, June 25th, 2007

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.

(more…)

Extending the script bindings for Java

Tuesday, June 12th, 2007

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.