Skip to content

2. Table Template Example

JoaoVasconcelos2 edited this page Mar 15, 2016 · 1 revision

Table template is one of the custom Slim table types defined by this plugin. This table type is a custom extension of Slim’s scenario, to define a parameterized script. The advantage of this custom extension is that the scenario’s parameters do not have to be listed in its first row (but only in the rows where they are used and in the decision table). This is, of course, especially convenient when there are many parameters.

In the example below the table template is invoked multiple times from a Decision table, once for each row. (The example uses the browser test fixture from hsac-fitnesse-fixtures)

table template check original price
open http://www.funda.nl
enter @{address}, @{city} as Locatie
select € 1.000.000 for Prijsklasse
select € 2.000.000 for tot
click Zoeken
click @{address}
click Kenmerken
check value of Vraagprijs @{price}
check value of Oorspronkelijke vraagprijs @{originalPrice}
check value of Inhoud @{volume}
check value of woonoppervlakte @{squareMeters} m²
check value of Bouwjaar @{yearBuilt}
script browser test
check original price
address city price original price square meters year built volume
Maliebaan 50 A Utrecht € 1.295.000 k.k. € 1.395.000 k.k. 300 1930 900 m³
Wilhelminapark 2 Utrecht € 1.975.000 k.k. null 440 Voor 1906 1.300 m³
Clone this wiki locally