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


 

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s