In the post I’d like to share my experience and thoughts about automation of testing BW(Bex) queries. During upgrade/migration projects customer wants to be sure that its BW(Bex) queries return the same result before and after upgrade ceteris paribus. It’s not always true because SAP as a vendor make modification in the standard function modules, classes and so on, used in BW(Bex) queries. Even if we know wht was changed in recently installed service pack, the question “How it influence particulary to the set of critical BW(Bex) queries?” is open. That’s why automation of testing BW(BEx)-queries can guarantee that you never miss unaffordable changes. And it saves project costs, because it will take your only a couple of minutes to perform the comparative test and find out the problem areas.
The blog consist of 2 parts: summary and detail.
In the summary part I post the only one screenshot. It shows final screen with test results: Bex-query result set before changes [in the system / in the query data / in the query logic or smth. like that] and after changes. Red color in cells means that comparion fails: query executed “after changes” (upper part) produces different result in comparison with query executed “before changes” (lower part).
In the detail part I post series of screenshots “step-by-step” to set up the most part of relevant settings.
Firstly, decide what query you would test. Prepare their technical names and variable values for their selection screens. Then run tcode: RSTT and activate trace for ther user
Now you can start recording query results to be compared after changes. During my investigatoin the best way to record query results is by using tcode RSRT with HTML-presentation. Unfortunately this type is not relevant for BW4/HANA. But other types of presentation like list, BICS are difficult to compare. Try’em by your own and I you can understand what I mean.
Then return to RSTT and stop tracing. Lets review trace results
In the tab “Ref.Data” you can see recorded results of query execution (in my example I recorded 2 bex queries, that’s why 2 records in log you can see on some previous slides).
Here the recorded result:
Then I made some settings for automation of testing process. I created test package with the trace record…
… and test job for execution test package next time, after some changes in the BW system.
You can see results of job execution by clicking on reporting icon in the grid (see above picture). Then you drill into separated BexQuery with job log (see filter on Log GUID field) which stated that everything was OK (Message Type S)
Next I made some changes in the BW system which lead to Bex query result changes. And execute the job immediately (again)
after job finished I went to job log tab and drill into BExQuery with job log again
Error status in Message Type!
So we need to make detail investigation next! Go to CATTS TRACE and execute trace record again
We see error status which means that saved results are differ from last recorded results.
Go to detail information and see.. the same slide as in summary part of the blog.