HelpThis is Tinderbox Cookbook version 2.0.1, created in conjunction with Tinderbox 7.3.2. The locale settings used to export this document: en-US. Most date tests were written/tested on a UK day/month order system and thus tests may fail if exported using different locale settings.
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:
- a description of some facet of Tinderbox
- an example of typical use
- the expected result of the example
- the actual result of the example
- a status marker, indicating whether the actual result is acceptable
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.
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:
- a brief description of the task ($Text)
- the expression the test will evaluate ($Try)
- the expected result ($Expected)
- the actual result
- the test status
. 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?
Cookbook and Export Elements
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 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.