Testing Method in ADT/HANA Studio ABAP Console
If ADT or hana studio is being used for the ABAP development then sometime we can test the method with ABAP Console.
Below is the interface with MAIN method. This interface we are going to use in out class whose method we want to verify the result in ADT /HANA Studio ABAP Console.
Below is one class with one method – GET_INFO which is a AMDP procedure but it could be a simple method also not necessarily any AMDP.
The method is implemented and additionally implemented the MAIN method of the IF_OO_ADT_CLASSRUN to test in ABAP console. In the main method we just called our original method GET_INFO and prints the output with the help of WRITE( ) method in teh ABAP console.
Usually i use a test report program to call the abap method and verify the result but now we are not going to use this.
In the class editor it self, select the RUN AS.. button and select the ABAP Application(Console) option.
Now the output result is printed in the ABAP console it self. ! seems a cool feature of ADT !
One comment