Home

Encontro Ágil 2010 - Lighting talk about Test Automation with TestLink and Hudson

kinow @ Nov 02, 2010 11:45:09 ()

On November 6th (next Saturday) Anderson Santos and I will present a Test Automation solution built on TestLink and Hudson at Encontro Ágil 2010. This meeting is for intended for the Agile community and will be hold at IME-USP (Instituto de Matemática e Estatística - Universidade de Sáo Paulo).


In our demonstration we will be using TestLink 1.9 HEAD version, Hudson 1.366 and TestLink Hudson Plug-in 2.0-SNAPSHOT. This TestLink Hudson Plug-in version is still not released as we are finishing to code the integration between the plug-in and TAP through tap4j, an implementation of TAP - Test Anything Protocol.

What is nice about this solution is that we aren’t trying to use TestLink as an Automation Tool. But yes, as a Test Management Tool (what TestLink is by nature). And the choice of the Test Execution Tool is up to you, as long as you generate TAP Stream (basically, files containing a log of tests executed). We only enable you to have these tests updated on your TestLink installation, this way you can plan a Test Cycle with both Manual and Automated Tests in one single tool.

And lastly but not less important, this week Testing Experience Magazine accepted a proposal of article for the next issue on Open Source Tools about this solution. So we are working very hard to release TestLink Hudson Plug-in new version and spread this Test Automation Solution through the Testing/Quality community.

Cheers

Extract images from a Word document

kinow @ Oct 15, 2010 16:10:26 ()

Some time ago I was asked by my boss to get all the images out of a Word document and save them in a separated directory. In this site the author gives you several different ways of extracting images from a Word document. However what I wanted was a quick and dirt way of having these images extracted without macros or having to open and save the document in HTML format.

So I wrote this quick and dirt word images extractor. It has two versions, one where you need to pass the .doc file as parameter and another one that gives you an input dialog box to point out where is the file. You can get the VBScripts from http://github.com/kinow/word-images-extractor.

Behind the scenes, this VBScript uses Word to save your .doc as .html and then copies the saved images into the same directory as your word file. So yes, you do have to have Word installed. If somebody gets interested in improving it, he/she could find a way of extracting multiple files at once. In this version some files are overridden. He/she could add to the beginning of the image name the word file name. Or it could be required to pass the output directory together with the input word file.

That’s it, I hope it might be helpful to somebody as it was - and still is - to me. :-)

http://github.com/kinow/word-images-extractor

Cheers

tap4j - A new TAP implementation in Java

kinow @ Oct 12, 2010 09:45:49 ()

A month ago I started a project to help me in my new version of the TestLink Hudson plug-in. The plugin now relies heavily on Apache Maven for test execution. After reading a post on TestLink forum about an automation done using TAP, I googled to learn what that acronym stood for.

TAP is the abbreviation of Test Anything Protocol.It is a protocol to produce information about test execution and used mainly by the Perl community. For instance, you can test your system using PHPUnit, JUnit, Selenium or even a C class and produce what they call a TAP Stream. This stream’s content is like follows:

TAP version 13
1..2
ok 1 Test 1
ok 2

The text above tells us that we are using the version 13 of TAP. That we have 2 tests (1..‘2’) and that both tests were executed without errors. TAP is a human readable text that can be interpreted by a software for audit, report or whatever. Another tool can then parse this TAP Stream and prepare Reports, update Database among other uses (this is what TestLink Hudson plug-in is going to do on its new version ;-).

tap4j is a simple Java implementation of the TAP protocol (sorry to repeat the protocol part of the acronym right after it, but sounds cool :-). The project is built with Java 1.5 and Maven and hosted on SourceForge. The artifacts are published on Maven Central Repository but the jar is also uploaded into SourceForge. Up to now the project has only two members. Apart from me, there is César Fernandes Almeida, a friend from university that is helping me with the ideas, tests and code. But we really need more help, specially from people that know Perl (Harness, Simple, etc) to help us make integration tests using TAP Streams generated by these tools.

The 1.0 version supports Header, Plan, Footer, Test Results, Comments and Bail Out expressions. All these supported elements can be retrieved through the API, even the comments list. Any invalid text is ignored but you can also retrieve this information using the API.

We are already working on a new version, 1.1. This version will support YAML diagnostics, letting you put a whole Exception stack trace on your TAP Stream. Nice uhn? Check how YAML looks like.

file:  foo.t
line:  45
description: an important test
found: this
wanted: that
raw_test: is( "this", "that", "an important test" );
extensions:
    THAC0: 16

Cheers

Jacobe Maven Plugin

kinow @ Sep 29, 2010 16:43:25 ()

When I started working in the TestLink java api with Daniel Padilla, he mentioned in some of his mails a tool called Jacobe. After I googled for this tool I found it in TIOBE‘s website. Jacobe is a tool of TIOBE that beautifies your Java code, according to some rules that you can specify in one configuration file.

This is what Jacobe does, basically.

Jacobe itself is an executable but TIOBE provides an Ant task that lets you call Jacobe from an Ant build file. But wait a minute! What about Maven? Yeah, exactly. Jacobe lacked of Maven support. I talked to the guys from TIOBE and they kindly let me implement a Maven Plugin for Jacobe.

The plugin source code is hosted at SourceForge.net, and you can find a quick Introduction about it in http://maven-jacobe.sourceforge.net/. The maven plugin version 1.0 artifact was released on Wednesday to Sonatype’s release repository and Sonatype already enabled Maven Central Repository synchronization. However it may take some time for them update the repository index.

Cheers.

New version of CCM Hudson Plugin released

kinow @ Sep 28, 2010 08:55:53 ()

Yesterday I released a new version of CCM Hudson Plugin. In this version, 1.0.1, there are two bugs fixed (7522 and 7531). For a more detailed background on these two issues check out Hudson JIRA.

Both bugs were reported by Sven Borman. The first BUG referred to a problem executing CCM Hudson Plugin in distributed environments. Although I’ve read the documentation for making plugins behave in distributed environments I forgot to use the Callable interfaces to execute some parts of the code in the Slave and then serialize the result back to the master node.

And the latter BUG was a problem executing the command in a Windows 2003 environment. In the beginning I thought there would be something wrong in the BUG description. Bug after setting up a Virtual Machine with Windows 2003 I noticed that the command without double quotes didn’t work correctly in the Windows 2003. Although it worked in Windows XP, Vista and Windows 7.

Nice catch Sven! Cheers.