Try OpenEdge Now
skip to main content
Online Help
Overview of ABLUnit testing framework : Concepts : Lifecycle of ABLUnit framework
 

Lifecycle of ABLUnit framework

The ABLUnit testing framework uses annotations to specify that a method in a test class or an internal procedure in a test procedure is a test case.
The @Test annotation is used to mark a method or internal procedure as a test case. The testing framework identifies the test case using the @Test annotation and executes the test case.
The scope of a test case is defined inside a test class or test procedure. A test class or procedure is annotated using @Before and @After.
The ABLUnit testing framework can be invoked, for example, by providing a test class or a test procedure. The framework identifies the test cases by looking for test annotations associated with methods or procedures. The execution of test cases proceeds as defined below:
1. If a method or procedure marked with @Before annotation is present, it is executed before any test cases.
2. If a method or procedure marked with @After annotation is present, it is executed after executing all the test cases.
3. For each test method or procedure:
*@Setup annotated method or procedure is executed, if there is any.
*The test method or procedure is executed.
*@TearDown annotated method or procedure is executed, if there is any.