SAP ABAP Data Element SAUNIT_D_ATTRIBUTE_RT_DURATION (Duration)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-DWB-TOO-UT (Application Component) ABAP Unit
     SABP_UNIT_CORE_API (Package) ABAP Unit: Public API
Basic Data
Data Element SAUNIT_D_ATTRIBUTE_RT_DURATION
Short Description Duration  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type SAUNIT_ATTRIBUTE_RT_DURATION    
Data Type INT1   1-byte integer, integer number <= 255 
Length 3    
Decimal Places 0    
Output Length 3    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short  
Medium  
Long 20 Runtime 
Heading  
Documentation

Definition

The DURATION property allows you to formulate an expected runtime for unit tests. This runtime is the cumulated runtime for all methods in a test class:

  • SHORT - within the blink of an eye
  • MEDIUM - take a sip of tea
  • LONG - get another cup

The time limit is calculated by real time, this means for sample occasional compilation counts too against this limitation. To be on the save side, in case of doubts choose the higher category.

Maintenance

Use on of the following key words in the CLASS DEFINITON statement of a test class to specify the duration category:

  • DURATION SHORT (default)
  • DURATION MEDIUM
  • DURATION LONG

Purpose

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.

With help of this classification of the duration the test runner is able to detect these situations and cancel the execution. This option is particularly useful in mass processing, for sample the execution of an ABAP Unit Favorite.

.

History
Last changed by/on SAP  20110908 
SAP Release Created in 700