Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

SAP C_ABAPD_2507 Exam - Topic 2 Question 23 Discussion

You want to check the behavior of an ordinary class ZCL_ORDINARY with class LTCL_TEST. How do you specify LTCL_TEST as a test class?
A) Use the addition FOR TESTING in the class declaration of LTCL_TEST.
B) Create a parameter in the SETUP method of LTCL_TEST and set its value to ''Test''.
C) Use the addition FOR TESTING: LTCL_TEST in the class declaration of ZCL_ORDINARY.
D) Create LTCL_TEST in a special package that is reserved for test classes.

SAP C_ABAPD_2507 Exam - Topic 2 Question 23 Discussion

Actual exam question for SAP's C_ABAPD_2507 exam
Question #: 23
Topic #: 2
[All C_ABAPD_2507 Questions]

You want to check the behavior of an ordinary class ZCL_ORDINARY with class LTCL_TEST. How do you specify LTCL_TEST as a test class?

Show Suggested Answer Hide Answer
Suggested Answer: A

ABAP Unit test classes are declared with the addition FOR TESTING in the class definition. RAP test guides also show the same ABAP Unit pattern for local test classes:

CLASS ltcl_sc_r_agency DEFINITION FINAL FOR TESTING

DURATION SHORT

RISK LEVEL HARMLESS.

This is the canonical way to mark an ABAP class as a test class.


Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel