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.
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.
Great post! This could be super useful for regression testing of BW systems during upgrades.
Is scheduling the tests to get an alert if something changed also an option? That would allow routine monitoring of change impact on reports.
may you want to take a look at xGile a test automation solution for different SAP Technologies including SAP BEX Queries.
For further material please send me a short email to mailto:firstname.lastname@example.org
Probably, there are another approaches to get alert on tracing activities in test job, but I don't know them.
its a Great Post !!
As per the post, I was trying to test a query in BW system.
But I am stuck in creating Test package step. when I try to create test package its taking some random "test package GUID" instead of the one which was created in CATT trace step [trace GUID].
also test package GUID field is disable.
because of this random GUID test job is also failing and going for dump.
Could you please tell me the reason behind it.?
Thanks in advance,
Informative blog post.