1. we cut the data preparation of the SETUP method to place it into the test methods.
2. also database preparation was moved ( and placed in helperMethod - see later )
3. used a special logger to support unit testing
( open image in new tab for better view )
1. implemented database and local data preparation for this special test in the GIVEN part and used a helper method to do the INSERT and COMMIT etc.
2. extracted helper method to run the CUT and select results. This helper also assures that the Select is successful. ( we can reuse this method for some other tests ) For negative tests we need other coding in the test methods to assure sy-subrc = 4 as example.
3. introduced a #Macro to improve readability of assertions.
4. used the #Macro to shortly write the THEN part.
Yes, Methods could do nearly the same .... yes not debugable ... but is will debug those calls. In my opinion great blog of rdiger.plantiko2 applies here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |