BDD Components: Static or Dynamic

There are two types of BDD Components: Static and Dynamic.

A Static Component is a C# class derived from the class called StaticBDDComponent. There can be only one Static Component for each integration test, and it defines and describes the whole BDD Scenario. Inside a Static Component, there are all the methods that compose the BDD test Scenario. The choice of the Step Methods and the order of their execution are set programmatically by the declaration of the Given/When/Then attribute: if one or more methods, for example, declare a Given attribute, they are going to build the Given method chain of execution. The order of the execution is set by the first parameter of the attribute declaration: lower is the value of the numeric parameter, earlier is the execution of the method.

 

A Dynamic Component is a C# class derived from the class called DynamicBDDComponent. There can be one or more Dynamic Components for each integration test. The BDD Scenario can be composed by picking out the Given/When/Then methods from every Dynamic Component. The choice of the Step Methods and the order of their execution are set using the inspector of the component called "BDD Extension Runner".

 

Back to: The BDD Methods and the Step Methods Read next: Static BDD Methods signature

 

© 2017 Hud Dimension. All Rights Reserved.

Search