Document Testing

Document Testing

It is a good idea to test a document before spinning document variations for actual use. The usual problems are grammar errors caused by spintax phrases. Changing element attributes is also a source of problems. The editor’s "Test" buttons spin the document and place a variation in the test pane where it can be examined for errors. Clicking them repeatedly will spin new variations, so how the document varies during spinning can be observed.

Aside from looking for problems, the test buttons can be used to spin a single variation that can then be copied from the test pane to the system clipboard and pasted into another application.

The following image shows a small document in the edit pane and a test variation in the test pane. The tabs at the top switch between the two panes.

Testing a spintax document

Variations spun for the test pane use the document’s settings to control HTML compatibility just like "Whirl" and "Quick Whirl." So if, for example, the settings’ option for HTML style paragraphs has been enabled then the test variation will be shown with paragraphs wrapped in HTML "P" tags.

Retaining Spintax

There are two additional test buttons that spin test variations with unresolved spintax. These are the same as the retain spintax options for spinning document variations with the "Whirl" dialog. One retains spintax using the standard form. The other retains spintax and attempts to turn high level structures, like line groups, into large blocks of spintax.

Using the example document shown above, testing while retaining spintax could spin a test variation like the following.

To {draw|fetch} a {bucket|pail} of water, {Jack and Jill|Jill and Jack}
went up the {hill|hillock|knoll}.

Jack {fell down|fell over} and {broke|busted|cracked|fractured} his
{crown|head|melon}, and Jill came {falling down|tumbling} after.

Testing with structural spintax would generate this.

{{Jack and Jill|Jill and Jack} went up the {hill|hillock|knoll}
to {draw|fetch} a {bucket|pail} of water.|To {draw|fetch} a {bucket|pail}
of water, {Jack and Jill|Jill and Jack} went up the {hill|hillock|knoll}.}

{Jack {fell down|fell over} and {broke|busted|cracked|fractured} his
{crown|head|melon}, and Jill came {falling down|tumbling} after.|Jill came
{falling down|tumbling} after Jack {fell down|fell over} and
{broke|busted|cracked|fractured} his {crown|head|melon}.}

Repeating a Test

The "Repeat Test" button repeats the last variation spun with the test buttons. Only the changed parts of the document will be different. If a problem is discovered when testing, the document can be edited then the "Repeat Test" button can be used to spin the same variation to see whether the change fixed the issue.