Testing functionality specific to Behavior Testing Framework
There are also features used to create and manipulate test data that are specific to Behavior Testing Framework.
Developers who intended to write implementation code for Behavior Testing Framework need to have a good understanding of these features as well.
Test data sets
A test data set is a set of data that is loaded into the application prior to the execution of any feature file of scenario. A test data set typically provides enough administration and business data to make the application sufficient robust for behavior testing.
For example, suppose that you want to test assignment behavior for an activity. To test this behavior, you may need a certain number of groups and users to ensure that each activity is assigned to an appropriate group and user.
In the base configuration of Behavior Testing Framework, the test data set is the PolicyCenter "small" sample data. Customers can configure Behavior Testing Framework to use a custom test data set as needed.
Data wrappers
A data wrapper is an object that stores information needed by multiple step methods or impl methods. Data wrapper objects are injected into various step classes and impl classes. Whenever a data wrapper is injected into a class, the methods of that class can:
- Retrieve information from the data wrapper object, even though the data wrapper object is not explicitly passed to the method as an input parameter.
- Put information into the data wrapper, even though the data wrapper object is not explicitly returned by the method as a return value.
Data wrappers simplify code by providing a mechanism for methods to exchange information within a single scenario without explicitly passing parameter or calling methods on other objects.
For more information, see Data wrappers.
The DataSetup class
The DataSetup classes provide methods that simplify the ability to use a single builder across multiple impl methods. They also provide methods to enhance some of the platform test data builders.
For more information, see The DataSetup class.
Transformers
Behavior Testing Framework provides a set of Transformer classes. Each class has a transform method that simplifies and standardizes the transformation of String values into some other type of value, such as typelist values or monetary values.
For more information, see Transformers.
