Help

This is Tinderbox Cookbook version 2.0.0, created in conjunction with Tinderbox 5.11.2.

The locale settings used to export this document: en-GB. Most date tests were written/tested on a UK day/month order system and thus tests may fail if exported using different locale settings.

What's this?

The Tinderbox Cookbook is a Tinderbox document that helps explore details of Tinderbox actions, rules, and export template. It is a useful supplement to the manual, letting you see exactly what Tinderbox does in a variety of situations.

How it works

The Cookbook builds an HTML page you can view in a Web browser. This page contains a number of tests, which include:

Thus, the Cookbook provides many examples of Tinderbox's expected behavior, and also displays whether the version you’re using is, in fact, behaving as expected.

Your version of Tinderbox may well be newer than the Cookbook, and might conceivably contain corrections that improve Tinderbox's behavior from the Cookbook’s baseline.

What can I test for?

Most often, we can anticipate exactly what the result of a Tinderbox expression will be. For example, the result of "1+2" will be "3". In these common cases, you typically use test 'equal', which confirms that the result is exactly the same as the expected result.

The test class test 'beginsWith' tests whether the result begins with the expected string. For example, version numbers may change, and we don’t want to generate a warning when using the Cookbook with version 9.5.3 just because the Cookbook was written for 9.5.2.

There is a test 'endsWith' twhich is an opposite of the above test.

Additional test classes may be added in the future. Test classes are not very difficult to write -- they are simply Javascript routines -- and you may add your own.

What does the Cookbook cover?

The Cookbook can potentially cover almost all Tinderbox agent queries, actions, and export templates.

How do I extend the Cookbook?

The Cookbook document provides three key prototypes.

Page adds an entire new page.

A page may contain one or more Test Suites. A test suite describes a set of related operations, such as "+" or "^title^".

A test suite may, in turn, contain one or more tests. A test attempts a single operation, and generates one line of information including:

Test status is computed in Javascript when the page is loaded in the browser. The script looks for elements that have class test, typically <td class="test equal">. The second class in this example indicates that the result should be identical to the expected result. If this is true, we add the class "right" which styles the test green; if this is not true, the script adds the class "wrong" which styles the test red.

How can I contribute?

Write new examples.

Improve the descriptions of current examples, making them clearer and easier for other users to understand.

Send us your improvements to share with others.

Cookbook and Export Elements

Cookbook provides separate prototypes for testing actions and expression (test suite) and for testing export elements (export suite). The templates are nearly identical, but export suite (and its helper export test) escape the caret symbol ^ in order to display export expressions properly.