[uf-discuss] requirements testing

Mark Rickerby maetl at mcs.vuw.ac.nz
Wed Dec 14 17:21:57 PST 2005

Hi all,

For the last few months, I've been considering possibilities for using
HTML to define test cases, with references to various testing formats
from around the web:


Through my work, I've had to write a lot of tests, and in some cases I
would rather that they weren't bound to a specific framework or
language. It would also be good if they were readable by people who
aren't necessarily familiar with specific programming language syntax.
Hence HTML makes a lot of sense to use here.

One of the key things I've noted is that the existing tools already
based on an HTML format (like Selenium and FitNesse) use <table>
elements to define assertions. These tables are effective, but clunky,
and not particularly natural to write, when compared to the native
syntax of various unit testing frameworks (eg: JUnit, SimpleTest,

Heres an example from the Selenium documentation:

<table border="1" class="table">
<col width="23%" />
<col width="55%" />
<col width="21%" />
<tbody valign="top">
<td>John Smith</td>

Great idea, but it seems a kinda strange mash of HTML - especially if
this is intended to be hand coded. It strikes me that the natural
expression of a web test case is a bullet point list or an ordered
list. Here's an example using the Selenium semantics, which seems a
litttle bit more clear:

<ul class="test">
  <span class="command">type</span>
  <span class="target">nameField</span>
  <span class="value">John Smith</span>
  <span class="command">typeAndWait</span>
  <span class="target">textBoxThatSubmitsOnChange</span>
  <span class="value">newValue</span>

If we removed the selenium commands, and reduced the test case to
natural language semantics we would have something like:

<ul class="test">
  <li>type "John Smith" in nameField</li>
  <li>type "newValue" in textBoxThatSubmitsOnChange and wait</li>

This example gets to the root of the problem of documenting acceptance
tests in HTML: there are different levels of abstraction that will all
produce the same imperative command.

I was just wondering if anyone had any thoughts, criticism or
suggestions relating to this. The concept has been kicked around for a
while, so I thought I would push it out on the list, to see if anyone
else could see any significant overlaps with the existing microformats
work. Pointers to other testing tools / languages that I haven't yet
covered would be much appreciated, as would better HTML examples.

Also - is there such a thing as rel-test? Has anyone used this - or
has intentions to use this, and if so - where and what for?


mark rickerby

More information about the microformats-discuss mailing list