‎2019 Dec 02 4:55 PM
I read about this framework (represented by the class cl_osql_test_environment). Trying to do some tests, I found out, that it is not present in our system (ABAP Stack 750). With which release will it be available?
‎2019 Dec 02 9:25 PM
My initial answer "752" was deemed too short. But in any case the generic answer to "when will it be available" is
In a release higher than you're likely to see in your career.
But only when I'm feeling especially grumpy. What I do in 750 and below is encapsulate all db accesses - and indeed all SAP FM and Method calls - into a local data access class, lcl_dao, which is implemented wrt an interface, lif_dao. Then I can create ltd_dao and inject that into the class I want to test.
‎2019 Dec 02 9:25 PM
My initial answer "752" was deemed too short. But in any case the generic answer to "when will it be available" is
In a release higher than you're likely to see in your career.
But only when I'm feeling especially grumpy. What I do in 750 and below is encapsulate all db accesses - and indeed all SAP FM and Method calls - into a local data access class, lcl_dao, which is implemented wrt an interface, lif_dao. Then I can create ltd_dao and inject that into the class I want to test.
‎2019 Dec 03 8:38 AM
Yeah, that's similar to my approach. This fails of course in multilevel testing. If I want to stub a DB read that occurs in a class that depends on a class, that depends on the class under test, It would have come in handy to be able to double the SQL read with test data.