This pattern is unrestricted; it is used within any architectural layer.
A PED Test Class (Test) seeks to blend the best outcomes of traditional ‘in-container’ and ‘outside-the-container’ approaches. That is, functionally equivalent services (e.g. in-memory database/RESTful container/CDI container etc.) are lazily launched within the JUnit JVM using Test Rules. We call this approach the JUnit Strategy for Testing and demonstrate it with the open source Justify framework.
|Extend Base Class||N||Avoid Runners Also|
|Static Public Methods (enum)||N|
|Delegate to Rule/Helper/Populator||Y||1.|
- A Rule enables reusable configuration logic. An assertion class enables reusable assertion logic. A populator enables reusable database load logic.