BW (SAP Business Warehouse), SAP

SAP BW Query: Automation test setup, step-by-step

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.

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).

BW (SAP Business Warehouse), SAP

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

BW (SAP Business Warehouse), SAP

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.

BW (SAP Business Warehouse), SAP

BW (SAP Business Warehouse), SAP

Then return to RSTT and stop tracing. Lets review trace results

BW (SAP Business Warehouse), SAP

BW (SAP Business Warehouse), SAP

BW (SAP Business Warehouse), SAP

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).

BW (SAP Business Warehouse), SAP

Here the recorded result:

BW (SAP Business Warehouse), SAP

Then I made some settings for automation of testing process. I created test package with the trace record…

BW (SAP Business Warehouse), SAP

BW (SAP Business Warehouse), SAP

… and test job for execution test package next time, after some changes in the BW system.

BW (SAP Business Warehouse), SAP

BW (SAP Business Warehouse), SAP

BW (SAP Business Warehouse), SAP

BW (SAP Business Warehouse), SAP

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)

BW (SAP Business Warehouse), SAP

Next I made some changes in the BW system which lead to Bex query result changes. And execute the job immediately (again)

BW (SAP Business Warehouse), SAP

after job finished I went to job log tab and drill into BExQuery with job log again

BW (SAP Business Warehouse), SAP

Error status in Message Type!

BW (SAP Business Warehouse), SAP

So we need to make detail investigation next! Go to CATTS TRACE and execute trace record again

BW (SAP Business Warehouse), SAP

BW (SAP Business Warehouse), SAP

We see error status which means that saved results are differ from last recorded results.

BW (SAP Business Warehouse), SAP

Go to detail information and see.. the same slide as in summary part of the blog.

BW (SAP Business Warehouse), SAP

Leave a Reply

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