Ansicht
Dokumentation

ABENTEST_RELATIONS - TEST RELATIONS

ABENTEST_RELATIONS - TEST RELATIONS

TXBHW - Original Tax Base Amount in Local Currency   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Test Relations

"! @testing $[kind:$]name

This special ABAP Doc comment can be used in front of the declaration of a test class or a test method to define a test relation that links the test class or test method with the repository object specified after @testing.

  • name is used to specify the name of a repository object, which is not case-sensitive.
  • kind is used to specify the type of the repository object. The following repository objects are possible and kind must be specified as shown:

kind cannot and must not be specified for global classes and CDS entities. They are addressed by their names alone.

Defining a test relation between a test class or test method and a repository object, has the effect that the test can be displayed and executed for this object in ADT.

Notes

  • Test relations are used to link repository objects with external unit tests. This is especially useful for repository objects that do not support test classes themselves.
  • The current program of the test class or test method cannot be specified.
  • Multiple test relations can be specified for a single test class or test method.
  • For more information, see Writing ABAP Unit with Test Relations.

Example

Defining test relations between a test class and its test methods and various repository objects.

"! @testing cl_demo1
"! @testing cl_demo2
CLASS test_demo_cds_association DEFINITION FOR TESTING.
  PRIVATE SECTION.
    METHODS:
     test_class1 FOR TESTING,
     test_class2 FOR TESTING,
     "! @testing demo_cds_view
     test_cds_view FOR TESTING,
     "! @testing XSLT:demo_trafo
     test_transformation FOR TESTING.
ENDCLASS.






General Data in Customer Master   General Material Data  
This documentation is copyright by SAP AG.

Length: 3619 Date: 20240425 Time: 040517     sap01-206 ( 41 ms )