Skip to Content
Author's profile photo Sergey Shablykin

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

Hi, community!

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.

.

 

 

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Shai Greenberg
      Shai Greenberg

      Hi Sergey,

      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.

      - Shai

      Author's profile photo Klaus Steinbach
      Klaus Steinbach

      Hi Shai,

      may you want to take a look at xGile a test automation solution for different SAP Technologies including SAP BEX Queries.

      http://www.exoriens.de/

      For further material please send me a short email to mailto:klaus.steinbach@exoriens.de

      Kind Regards,

      Klaus

      Author's profile photo Sergey Shablykin
      Sergey Shablykin
      Blog Post Author

      Hi, Shai.

      1. Test job can be scheduled for periodic run.
      2. You can create Bex Query similar to the one used to monitor trace status. I mean query in screenshot, located immediately after text "Error status in Message Type!". In your query you can define Exception based on presense E status. Then you can create broadcasting of BexReport based on Red Exception status. It requires BW-skills and (optionally, BI Platform skills) to do this. So you can get alert via e-mail.

      Probably, there are another approaches to get alert on tracing activities in test job, but I don't know them.

      Sergey.

      Author's profile photo Swathi Makkar
      Swathi Makkar

      Hi Sergey,

      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,

      swathimrao84@gmail.com

       

      Author's profile photo Harish Allachervu
      Harish Allachervu

      Hello Sergey,

       

      Informative blog post.

       

      Regards,

      Harish