Annotations supported with ABLUnit
- Last Updated: March 13, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The ABLUnit testing framework uses the source-only ABL annotation syntax to identify and execute the methods or internal procedures in a test class or test procedure.
The following table provides an overview of the supported annotation names in the ABLUnit testing framework. Annotations appear in the order in which they are executed during the lifecycle of a test class or test procedure. Note that some annotation names prefixed with “Legacy” indicate an older, but still supported, name. It is suggested to adopt the new names to improve readability and clarity.
| Annotation | Purpose |
|---|---|
@Testsuite1 |
Identifies a listing of test procedures or test classes. See Test Suite Class and Test Suite Procedure. Note: This annotation is mandatory for a
test suite. |
@BeforeAllLegacy:
|
Executes the method or procedure once per class, before the start of
all tests. This annotation may be used to perform
time-sensitive activities such as connecting to a database. Note: Use of @Before is deprecated
but still supported. |
@BeforeEachLegacy: |
Identifies a method or procedure to be executed before each of the
test methods or procedures. This annotation may be used to prepare the
test environment such as by reading input data or initializing the test
class. You may have multiple
Note: Use of @Setup is deprecated
but still supported. |
@Test |
Indicates that a class method or internal
procedure is a test case. Note: This annotation is
mandatory for a test method or procedure. |
@Test(expected="ExceptionType") |
Specialized variation of the @Test
annotation. This causes the test method/procedure to fail if it does not
throw the exception mentioned in the expected
attribute. Use this to test a use case which is expected to fail by
throwing an
error.Examples: |
@AfterEachLegacy:
|
Executes the method or procedure after
each test. This annotation may be used to clean up the test environment
such as deleting temporary data or restoring defaults. Note: Use of @TearDown is
deprecated but still supported. |
@AfterAllLegacy:
|
Executes the method or procedure once,
after all the tests have executed. This annotation may be used to
perform clean-up activities such as disconnecting from a database. Note: Use of @After is deprecated
but still supported. |
@Ignore |
Ignores the test. You can use this annotation when you are still working on code, the test case is not ready to run, or if the execution time of the test is too long to be included at runtime. |
@TestSuite annotation
or at least one @Test annotation are considered
tests and will be added to the list of tests to run. All other
programs are ignored by the ABLUnit test runner.