You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/checks/db-access-in-ut.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,3 +24,30 @@ The pseudo comment must be placed right after the DB access statement.
24
24
```abap
25
25
SELECT XXXXX. "#EC DB_ACCESS_UT
26
26
```
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