Hidden table heads feature is the Fitnesse Visual Polymorphism

What you can see in the Fitnesse User Guide

You can hide the first row of a table. This allows you to write comment tables that just look like ordinary HTML tables.
The complete table still gets executed, the first row is just hidden by a CSS rule.
Precede the first row with a ‘#’.  (KV comment: will be changed to – instead of # in the upcomming Fitnesse releases)

But I want to expand this definition.
You can use Hidden table heads feature to conceal the needless things in your acceptance test script!

Fitnesse Visual Polymorphism

Imagine that you have two scenarios
------------ScenarioLibrary page------------
|scenario|execute and check|command|
------------ScenarioLibrary page------------

You can use them in your test
------------SetUp page------------
|cmd /c rd /S /Q "C:\AnyDirectory"|

-!|execute and check|
|WMIC product where name='My Product'" call Uninstall|
------------test page------------

The first one tries to delet the directory. cmd will return 0 if success and 2 if directory doesn’t exists. So I am not care about the result. Using the execute scenario.
The second performs the product uninstallation. It is critical to know the result (e.g. if this SetUp page will be included into product setup testing suite). So I use the different scenario execute and check in that case.
But all this things (check or not to check) are just the noise in that case. So I am hidding them into scenario and making the Tables Heads hidden.
The final SetUp page will not have any noise.  Just facts:)

cmd /c rd /S /Q “C:\AnyDirectory”
WMIC product where name=’My Product'” call Uninstall

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: