FitNesse. UserGuide. FixtureGallery. ImportantConcepts.
MarkupVariables [add child]

Previous page: Symbols Parent page: Important concepts

Markup Variables

Markup variables are used for macro-replacement in

!define variablename {value}

and then use it anywhere in the page with this syntax:


undefined variable: value

Unlike symbols, markup variables can be used also as a part of a cell. Note that variables are processed in

!define town {Houston}

!|ColumnFixtureTest|
|firstPart|secondPart|together?|
|Hello|World|Hello, World|
|undefined variable: town|We Have a Problem|undefined variable: town, We Have a Problem|


Markup variables are especially useful to extract a common value to a single place, so that it can be changed easily. They can also be used to parameterise included pages. For example, you can write a test component that is frequently used, and then call it with different parameter values by using markup variables. See http://fitnesse.org<UserGuide.ParameterizedIncludes for an example.


Previous page: Symbols Parent page: Important concepts