Templates

Resuable steps that can be imported and overridden - unleash the power!

Documentation /

Templates

Madcow 2.0 provides the ability to define a set of templates, which can be imported into a test. This allows for a common set of test functions to be defined and reused throughout multiple tests.

Defining a Template

Templates are properties files defined outside of the default Madcow 2.0 test folder - by default, under templates.
They support the same syntax and operations as a normal Madcow 2.0 GRASS file test, with the main difference being that are not run as part of the collection of tests.

Data Parameters and Templates

As templates support all Madcow operations, they support the use of Data Parameters.
This enables the user to create generic functionality, which can be reused by altering the data passed to the template from a test.

Building on the examples previously, we could pass through the currency and country being searched for in the template from our test.