Abap

Testability in New ABAP Context

With HANA, we get the speed and power of computing which pushes the code to perform complex functionalities with runtime data. This makes testability of any complex program – a critical attribute of the quality parameter.

Use of CDS:

In our previous blog, we saw that use of CDS improves readability of the program, but it can also improves testability of the programs. Testability improves if the individual components can be tested for its accuracy. We can push a lot of calculation to CDS and then can test the CDS easily from ADT to verify whether it is working as per requirement or not.

Use of Class Method

If I am writing a long code, I would use class methods (or even function modules) instead of subroutines so that the components can be tested standalone. Obviously, we need to make a judgement call here whether the complexity of the requirement warrant such measure. And if you are going to make methods, be sure to model in such a way that they can be tested by entering some manageable parameters.

For example, there is no point making a method, which would need the entire internal table as input. Rather, I would pass one row at a time to the method. Granted it may take longer time but this is what we are stressing this blog series. Now we have liberty to do these things due to fast computing power. Be sure to look at the bigger picture and then access whether the benefit of testability outweighs the problems it will bring.

In next blog, we will talk about stability and performance. Stay tuned.

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)

Follow by Email
Twitter
LinkedIn
LinkedIn
Share