Visualize XML then Blink Test

XML format is a very popular data container. Programs read, generate, convert, and exchange data in XML format.
XML data chunks can be uploaded from application's GUI, or can be generated by a client part and then transmitted to a server. XML data input can be effectively used when an application has unstable GUI or has no GUI at all.

[sourcecode language="XML"]
<pre><?xml version="1.0" encoding="utf-8"?>
<transactions>
<debit> <amount>10.0</amount></debit>
<credit> <amount>55.0</amount> </credit>
<debit> <amount>120.0</amount> </debit>
<debit> <amount>25.0</amount> </debit>
<credit> <amount>5.0</amount> </credit>
<credil> <amount>15.0</amount> </credil>
<credit> <amount>15.0</amount> </credit>
<debit> <amount>60.0</amount> </debit>
<debit> <amount>50.05</amount> </debit>
<debit> <amount>75.0</amount> </debit>
</transactions></pre>
[/sourcecode]

...But, in testing, XML data verification task means time-consuming process of going through countless, similar-looking text lines, with a high chance to get bored and miss an inconsistency.

Sample Task


Verify “transactions” xml file presented above.
Only “debit” or “credit” records are valid. Any other entries must be located and reported.
Additionally, identify and report all debit records with debit amount greater than 50.00.

As you can see, even going through just 10 records takes a significant time and might become really boring task.
With a 100 of records it's pretty much a brain-dead work to do.

How can we transform it to re-enable brain-powered testing?


Blink Testing technique, as described by James Bach, would be a perfect fit to engage rapid pattern recognition capabilities of a human brain. However, applying it directly to a textual source of an XML file may lack of efficiency due to complexity of a pattern.

Transforming XML text into a web-page looking table (HTML table) with inconsistencies color-coded, gives an instant productivity boost for blink testing.

transactions

 

XML visualization technique


XML transformation, presented above, is performed with help of XSL (Extensible Stylesheet Language) script.
Creation of XSL scripts does not require installing any IDE - you can use just a text editor, like Notepad. You would need minimal programming experience to start creating your own scripts, and you can easily modify existing templates.

XML source sample and its visualization were taken from my article "XML verification example".
You can also find there XSL source code template and links to other XML/XSL related articles.