Showing posts with label XHarness. Show all posts
Showing posts with label XHarness. Show all posts

Wednesday, July 1, 2009

XHarness 1.0-beta-4 Released

XHarness version 1.0-beta-4 has just been released. It includes a couple of bug fixes and enhancements that have accumulated over the last few months, most notably the long overdue support for Ant 1.7.

Please see the Changelog on the XHarness website http://xharness.codehaus.org for more details.

You can download XHarness 1.0-beta-4 from the download page, alternatively if your using maven just update your poms.

Tuesday, September 30, 2008

MiR: September 2008

September was another busy month, so busy that I haven't had time to update my blog as much as I'd like too. I've been involved in a lot of the behind the scenes work that goes into project testing infrastructure, the dividends of this work will however trickle back as more developer time can now be devoted to handling issues as their discovered (the return on investment on xharness CPIs are always worth the time).

Cheers.

Sunday, August 31, 2008

MiR: August 2008

Month in Review: August 2008

August started out with quite a bit of excitement as the FUSE team gathered in Dublin Ireland to discuss project status and future development. This was my first time to see Dublin and meet the core group of Open Source developers working on the various components of FUSE.

Upon return to Newfoundland I dived into research and development involving Apache Servicemix Kernel and XHarness. The first phase of this work was to gain a deeper understanding of Apache Geronimo GShell, Plexus, and JLine. The second phase has been to improve XHarness to inter-operate smoothly with these technologies.

The first fruits of these efforts were released in XHarness 1.0-beta2, you can expect to see more improvements in the upcoming XHarness 1.0-beta3.

Sunday, August 10, 2008

XHarness How To: Using ignore ANSI.


With the release of XHarness 1.0-beta2 I have decided to write a quick how-to for using the new ignore ANSI feature. The reason for this feature addition was to resolve the issue separation of content and presentation.

When testing an application we are generally concerned with the correct content of output, presentation details such as bold text or text colour markups may not be essential to asserting a correct response.

Take for example an application that takes in a username and reports back "Hello username, welcome to example1 program". The general format of the XHarness definition to test this program would be:

<xh-execbg executable="${path.to.app}/bin/example1"
processname="example1"
dir="${path.to.app}"/>
<arg line="foobar"/>
</xh-execbg>
<assert timeout="10" erroronfail="true">
<and>
<outputcontains stream="stdout"
task="xh-execbg">Hello foobar, welcome to example1 program.</outputcontains>
</and>
</assert>


Given the input "foobar" we expect the output to be "Hello foobar, welcome to example1 program." In this case XHarness will run the demo application, assert the correct output was received, then report success.

Now what happens if we modify example1 program to print out username in bold? The above XHarness definition would report a failed assertion. The reason for this is that the output contains method will be looking for plain text, the markup to present bold text would violate the matching specified.

To simplify working with output that may include ANSI markups the ignoreansi attribute was added. The default behavior is to not ignore ANSI text markup control characters, thus allowing developers to consider these markups part of a correct response. If the developer however would like to ignore such presentation details and just focus on the content of a response they may alter their output contains fragments to the following:

<assert timeout="10" failonerror="true">
<and>
<outputcontains stream="stdout"
task="xh-execbg"
ignoreansi="true" >Hello foobar, welcome to example1 program.</outputcontains>
</and>
</assert>

This time when XHarness processes the output from example1 program it will assert a match successfully.

For more information on using XHarness please see the XHarness web site: http://xharness.codehaus.org

Friday, August 8, 2008

XHarness 1.0-beta2 Released

"XHarness is a system test harness for Apache Ant 1.6.x. It allows people to describe their product/system tests in the form of XML as part of an ant build file, describing the tasks and processes that comprise the test cases and what their expected behaviour is."

This latest release includes fixes to the Unix async launcher and includes a new ignore ANSI control character mode for output matching.

You can download XHarness 1.0-beta2 from the download page.