ABAP UNIT TEST-3

abap-unit-test Simple Unit Test using Global Class 

 

 


Below is the class with a method for which we want to do a unit test.

1


2


3


4


Create a new class and go to the methods tab.

5


Select the local test classes.

6

Here we can have local test class and use the SERVICE class CL_AUNIT_ASSERT to check the expected value with actual value.

7


Here we can do a  unit test from the menu path as shown.

8


The test is successful.

9


Let’s change the carrid value to check the unit test result.

10


So here is the unit test result displayed.

11


Also after coming out of the local test classed, from the shown menu path, unit test can be performed.

12


Here is the unit test and its result.

13


14


 

One comment

Leave a Reply