Skip to content

Commit 601f493

Browse files
Update db-access-in-ut.md
1 parent b2d5379 commit 601f493

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/checks/db-access-in-ut.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,30 @@ The pseudo comment must be placed right after the DB access statement.
2424
```abap
2525
SELECT XXXXX. "#EC DB_ACCESS_UT
2626
```
27+
### Risk Level
28+
Definition
29+
The RISK LEVEL describes the effects that a test can have on the data security of the system:
30+
• CRITICAL - such as changes to system settings or Customizing
31+
• DANGEROUS - such as changes to persistent data
32+
• HARMLESS - no effects on persistent data or system settings
33+
The RISK LEVEL is assigned by the following extension to the CLASS DEFINITION statement of a test class:
34+
• RISK LEVEL CRITICAL - default
35+
• RISK LEVEL DANGEROUS
36+
• RISK LEVEL HARMLESS
37+
38+
### Duration
39+
Definition
40+
The DURATION property allows you to define an expected runtime for all methods of a test class.
41+
• SHORT - within the blink of an eye ( < 10 seconds )
42+
• MEDIUM - take a sip of tea ( < 2 minutes )
43+
• LONG - get another cup
44+
At runtime the cumulated duration of all test methods is measured. If the actual duration exceeds the expectation ABAP Unit will raise an alert.
45+
Please not the cumulated duration contains also system activities as program compilation. In case of doubts it is recommend to choose the higher category.
46+
Maintenance
47+
Use on of the following key words in the CLASS DEFINITON statement of a test class to specify the duration category:
48+
• DURATION SHORT (default)
49+
• DURATION MEDIUM
50+
• DURATION LONG
51+
Purpose
52+
Unit tests consist of source code and can contain errors. It is easy to recognize syntax errors and runtime errors, but endless loops are more difficult to detect.
53+
With help of this classification of the duration the test runner is able to detect these situations and cancel the execution.

0 commit comments

Comments
 (0)