Skip to content

Adding detail to Conformance tool results

bill edited this page Sep 21, 2018 · 1 revision

Adding detail to Conformance tool results

Sometimes when validating the results of a Conformance test you need to display supporting detail to help the user understand the outcome. This note describes a technique for adding a table of detail to the log result display. The captions, content, number columns, and number of rows are controlled by the validation code.

Starting with an example display, here is a display from validating an MHD Document Source. All transactions for a particular actor/transaction type of a single simulator scanned and displayed. The purpose of this display is to show why certain messages satisfied a collection of grading criteria.

Example output

The results display looks like:

Adding detail to conf tool 1

Overall the table is hidden behind a Hide Details selection - sometimes the table can be quite large so it is only displayed when wanted. In the above display the selection is open. This display contains three tables. The header of each table has a grey background.

The first table has a header that covers the entire width and three rows of two columns. The second table is the same format and has one row. The third table has two columns, no overarching title but a title per column. Each of the two columns is empty.

All of this is fed by content in the log.xml file.

log.xml content that drives this display

This display was driven by the following content in log.xml file:

Adding detail to conf tool 3

The display is controlled by a series of <Detail> XML elements. Each <Detail> </Detail> pair can include free text and two control characters # and =.

A # character at the beginning of the line labels that line as a header which displays with a grey background.

The = character is used to divide the content into columns. Note that a full width header starts with # and ends with =.

The hyperlink is coded as URL[xxx](display) as shown.

Creating this content

The class that created this output is gov.nist.toolkit.testengine.engine.validations.ValidationPluginRunner.groovy. The <Detail> elements were added by calls like

logReport.addDetail("")

so the coding support for the # encoding is pretty minimal - just add it to the text. The = encoding is achieved by

logReport.addDetail("a", "b")

which generates

<Detail>a = b</Detail>

The logReport comes from the declaration

ILogReporting logReport

and ILogReporting is an interface supported by the class StepContext so it is easily availble.

Clone this wiki locally