Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Open SQL test double frameqork

jrgkraus
Active Contributor
0 Likes
887

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?

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
751

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.

2 REPLIES 2
Read only

matt
Active Contributor
0 Likes
752

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.

Read only

jrgkraus
Active Contributor
0 Likes
751

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.