Automating SAP BW Testing

Software testing 101

Automating SAP BW Testing

This presentation by Alain Traechslin at SAP SAPPHIRE explains how SAP key users can automate  SAP BW testing—avoiding painful manual data comparisons. 

Key Takeaways for SAP BI/BW Testing

  • Today, most testing is performed manually by business analysts. This means that business analysts are spending a significant amount of time on something that’s not their primary expertise or job function. 
  • What’s wrong with manual testing? It can’t possibly keep up with the speed and frequency of Agile sprints. The faster the application evolves, the farther behind you fall.
  • Want to test from SAP ECC all the way to SAP business warehouse (SAP BW)? To start, you need GUI support and API support. But you also need to test the data layer. 
  • One of the main use cases for SAP BW is copying master data and transactional data from the ECC system into the data warehouse. This means you need to test if the data has been copied accurately and completely. 
  • Another use case is testing migration projects. How do you migrate from SAP HANA versions or SAP BW versions? 
  • Tricentis Tosca can help you with both of these use cases, as well as general regression testing for data integrity.

Here’s a transcript of the SAP BW part of the discussion testing:

Say you want to test from SAP ECC all the way to SAP BW. Tosca can do that. We have support for all the SAP GUIs. Beyond that, we also have support for testing the APIs. We need to be able to the SAP systems. We can interact with all the common APIs that SAP is using. We can take the data and test it.

What does that mean? What are the use cases for testing SAP BW? One of the main use cases is data is being copied from the SAP ECC system. The data, either master data or transactional data, is copied into the business warehouse. We need to test if the data has been copied completely, and if the right data was copied. Another typical use case is migration projects. Say I want to migrate from SAP HANA version 1 to HANA version 2. Or, I want to migrate from my old BW to new BW. That’s when it’s helpful to have a tool help you. There’s also just the general regression testing that’s central to Agile. This frequent checking is key for identifying issues as early as possible, so they are faster, easier, and cheaper to fix.  

Now, let’s see what this looks like in Tosca. I’ve got two test cases. One goes through the GUI, one retrieves data from ECC, takes the data and compares it against what’s in my BW. The ECC part is the GUI, so we log in and this is how the test case looks. I’m just expanding here. These are the login credentials. We got some screenshots when we created those tests so you can change all the naming, you can make it understandable for a business user. What we are doing is we are saving this report onto the desktop and then taking it as an input form for our second test case, which compares that input to what’s in the SAP BW. 

Down here we see these are our connection details for the SAP BW and in this particular scenario, we are connected to an info provider. So the blue section is the test case section in Tosca and in the green section, that’s our execution list. Now we run an automated test case. What you will see is Tosca starting to do it and that’s just one way of doing it. I could also show you the direct API access but it’s not very exciting to watch because it’s all in the background, so you don’t see anything. But here we logged in, we start a transaction code, we go there, we save the file automatically. Once it saves on the desktop we have the second test set which does the comparison.

We found one difference between the ECC data and the data in BW. One test has passed and the other has failed. A report that shows us what exactly is different. You see on the column and cell level what has been different. So that’s your typical reconciliation test case. That’s one of the main use cases. This is usually done manually by business users, but it can all be automated. 

What we see here is we can directly access the SAP info provider but we can access five that are local, we can access five that are remote, we can access five that are on a data lake, Hadoop–there are no limits to this. ODBC of course, the new HANA speaks ODBC, so you can use it, it’s very versatile

The very last thing I want to show you is how this test case has been created, because I just showed you how we executed. In order to create it, we have wizards that that help the users to easily create such a test case. This part now is on the SAP BW side. We are connecting to the BW, so you see the connection pyramid is here, you see what user it’s connecting. We get a list of info providers, we get a list of data that is available that we can use that to test and a user would then choose whatever info provider he’s interested in. He would choose the dimensions, he would choose the measures and then use that as a comparison. And our goal is to really make it easy for the business user so he does not need to understand the underlying technologies or the underlying structure. It should be taken care of. And in this case, I’ve selected a source and I’m selecting a target. I can also compare it against another info provider, I can compare it against the baseline that I’ve created. I’ve got a lot of opportunities or possibilities here.