Plugin Fitnesse

The Fitnesse wiki plugin, introduced in Tiki 12.1, is inspired by the Acceptance Testing Framework of the same name.

Tiki applications are meant to be built through the content management system. Historically, the only way to test the behavior of the system was to add more content for edge cases. The Fitnesse plugin allows to create test suites to validate small portions of the system, define behavior (following ATDD) and communicate with developers about issues needed to be resolved.

Parameters

Create test suites for applications built using Tiki
Introduced in Tiki 12.1.
Go to the source code
Preferences required: wikiplugin_fitnesse

Parameters
(body of plugin) - Test execution scenario
no parameters


General Structure

The Fitnesse plugin defines an execution context. Each contained plugin is known as a fixture. These fixtures contain test cases to be validated. While each fixture can define its own format, they will typically contain a table-like structure.

While executing the tests, the plugin will re-write the internal table to display results. Validated entries will show as green, failures as red. As usual in Wiki Tables, %%% can be used as the newline separator.

Tracker Math

trackerId is a required argument. It is the tracker the calculation will be matched against.

The first row contains the list of permanent names within the tracker. The question mark at the end of a field name indicates that the field is a calculation field and must be validated.

The following rows are individual test cases. Each column contains an input value or the expected output in the case of a calculation field.

Examples
Copy to clipboard
{FITNESSE()} We want to prioritize important issues that are easy to solve. {TRACKERMATH(trackerId="42")} severity|simplicity|priority? 1|1|1 2|3|6 10|10|100 11|10|100 {TRACKERMATH} {FITNESSE}


Given a calculation of (mul severity simplicity), we would have the following result:

We want to prioritize important issues that are easy to solve.

Tracker Math for Bugs
severitysimplicitypriority?
111
236
1010100
1110110 (expect: 100)


Failure indicates the formula should include a cap on the priority level that has not been implemented.

Tracker Data

Tracker Data is a companion fixture to Tracker Math for formulas containing the (tracker-field) function to access data in a different tracker.

Data is defined for the current execution context and must be defined prior to usage.

The first row contains the permanent names and the itemId key (required). Other rows contains the matching values.

Examples
Copy to clipboard
{FITNESSE()} {TRACKERDATA(trackerId=11)} itemId|name|ranking 1|Wiki|10 2|Quiz|3 {TRACKERDATA} Some features matter more than others {TRACKERMATH(trackerId=42)} feature|severity|priority? 1|1|10 2|3|9 44|10|50 {TRACKERMATH} {FITNESSE}

Sample Calculation
Copy to clipboard
(mul severity (tracker-field (object (str trackeritem) feature) (field ranking) ) )


Expected results:

Tracker Data for Features
itemIdnameranking
1Wiki10
2Quiz3


Some features matter more than others

Tracker Math for Bugs
featureseveritypriority?
1110
239
44100 (expect: 50)


Failure indicates the features should have a default priority of 5.