Technology is Great

When it works for you and not against you

As you know, Hericus Software is a MicroISV. Part of what this means is that in choosing to do something - anything really - I always have to ask myself: "Does this activity scale?" If I get caught in the trap of doing too many things myself - and there are always too many things to do - I'll never make any forward progress.

So what does this have to do with Technology? Ever since the invention of the computer, predictions have been made that computers will save us time, handle grunt work for us, and free us up to do the more creative and advanced thinking. Most of the time, reality has fallen far short of these lofty expectations. Every now and then, though, some truly wonderful technology fulfills on this promise.

I just uploaded a video of a portion of our automated testing suite. The video shows some of the execution of our test suite that is specifically targeted at taking screen shots of the application. Each and every screen, editor, dialog, error/information message, is invoked and captured as a PNG image and saved in a specific location for inclusion in our documentation.

Zed Builds and Bugs is built in two major components. The back-end is a Java server that handles web traffic, server side execution, and database storage. The front-end is a Qooxdoo based JavaScript web application that runs in your browser. The front-end talks to the server exclusively via HTTP, and the servers talk to each other exclusively via HTTP. This makes both the client and the server extremely susceptible to automated testing approaches - which is very good, because automated testing scales.

I use Selenium for handling the client side automated testing, and I can tell you that the initial effort involved in building the test suite has paid off tremendously in terms of future ease of use and leverage of my time. Selenium works very well with the Qooxdoo framework, and has enabled me to ensure coverage of every screen in the application. When I add a new feature, upgrade a library or change something in the application, it takes all of 5 minutes for me to run through all of my client side automation to ensure that I haven't broken anything and that everything still works. That's leverage. And for a one man shop - that's a process that scales.

I use normal JUnit tests to drive Selenium which means I can work within a comfortable environment and still control everything in the GUI for testing. I also use JUnit to drive the testing of the Zed back-end server, and that keeps everything working in a standard way.

I uploaded the video above, because every now and then, I'm just excited by technology and what it enables me to do. Screen-shots for documentation was one of the toughest chores that I used to have to handle myself (I have to do everything myself). Once the light-bulb went on that connected the dots of Automated Testing and Automated ScreenShots, I didn't stop until it was done. Selenium makes this really nice, and with some extra tweaks that I added, it's literally as easy as this for me to load a form or launch a dialog and take some screen shots:

	public void testBuildGroups() {
		ConstAndGlob cag = ConstAndGlob.getInstance();
		String tabName = "Build Groups";
		String locator = ConstAndGlob.getTabViewLocator(workspace, 0);

		try {
			cag.selectPrimaryViewMenuOption(workspace, tabName);
			cag.waitForTab(workspace, tabName, 0, 10000);
			cag.doScreenShot(locator, "Screens.BuildGroupsList.png");
			String table = ConstAndGlob.getTableLocator(workspace, "Build Groups", 0);
			m_qx.qxTableDoubleClick(table, 0, 0);
			cag.waitForTab(workspace, "Build Group:", 0, 1000);
			cag.doScreenShot(locator, "Screens.BuildGroupEdit.png");
			cag.closeTab(workspace, "Build Group:", 0);
			cag.closeTab(workspace, tabName, 0);
		} catch (Exception e){

So now, every time I add a new feature, this becomes a standard part of the operation. When it's been coded, I run through the whole test suite - including screen shot captures - and I know that the whole application is still standing firm and working properly.

And as you would expect - since Zed Builds and Bugs is all about Continuous Integration and making your development life easier - I've rolled all of the automated testing into the standard continuous integration build that I do for Zed every time I submit a change. I know within 5 to 10 minutes how the state of the whole application fares and I can proceed with confidence with the next task.

I highly recommend using Selenium for automated web testing, and I can't thank the group over at Qooxdoo enough for creating a wonderful framework for building applications.

Steven M. Cherry