Dear SAP Cloud Integration, how do I unit test?
Stop testing your interfaces
Fellow Mentor Michal Krawczyk hosted networking sessions Stop testing your interface scenarios – you’re not doing it anyway right at TechEd last year to discuss about interface testing. The premise is that if you are not efficiently testing your interfaces (preferably using some form of automation), why bother?!
As a matter of fact, both Michal and Daniel Graversen have separately developed tools can that aid with automated interface testing. However, it’s a pity that this is only gaining popularity now when we are near the end of the shelf life of PI/PRO.
New wine in old wineskins
SAP Cloud Platform Integration is no doubt an exciting solution to work on. While there are efforts to ensure that it is gaining some level of feature parity with its older sibling PI, there is also a need to be wary of falling into old patterns of working.
These days, even old time SAP shops are trying to run in an Agile manner. However, if we continue to approach the development in Cloud Integration the same way we did in Process Integration, running Agile is near impossible.
With Cloud Integration still evolving and maturing, there in an opportunity now for SAP to break away from old development practices, and catch up with Gartner Magic Quadrant IPaaS market leaders.
To achieve this, there needs to be a paradigm shift on the different aspects like development, testing, deployment, etc.
The case for
If one dare to venture far enough outside the walled garden of SAP, one can discover many an interesting thing.
MuleSoft provides a testing framework named MUnit – some of the features are an integration developer’s dream come true.
- Imagine being able to test your integration scenarios locally on your desktop
- Imagine having the capability to script unit tests and automate their testing
- Imagine being able to mock endpoints and test your integration without actual systems
- Imagine having integration with Continuous Integration/Continuous Deployment that automates the whole build-to-deploy process
Keeping SAP relevant
So here is my wishlist as we enter this brave new world of SAP Cloud Platform Integration:-
- Continue investing in Eclipse instead of deprecating it in preference for Web UI (The whole topic of Web UI vs Eclipse deserves its own blog post – “Dear SAP Cloud Integration, Y U No Love Eclipse?” sounds like an apt name for it!)
- Include local integration engine in the Eclipse plugins to enable local testing
- Introduce a unit testing framework
- Enable capability to mock endpoints during unit testing
Dare we dream about doing things differently?
Thanks for sharing Eng Swee! I haven't been actively developing SAP integrations for a while now but besides the lack of user-centric monitoring capabilities (which has been addressed to some extent in the meantime), I always found the lack of a solid testing framework astonishing. This had led us as far as developing our own semi-automated regression testing solution.
Thanks for your comment and sharing your own experience. SAP development practices have traditionally been not too aligned with the widely practiced approaches outside the SAP universe. To be honest, I myself have been ignorant of them for the longest time and it is only when one sees how things are done differently elsewhere that then one may begin to question the long standing unquestioned practices.
Hi Eng. Unit testing is something I'm very interested in too (I co-authored the Detroubulator unit test tool for PI back in prehistoric times). I see a lot of opportunity in the upcoming Integration Flow API, including in the unit test area. It's something I'll be looking at, as soon as I can get my hands on the API 😀
Thanks for your comment. It’s great to know that there are a lot of interest in this area too (should we be expecting Detroubulator 2? 😀 )
Being far away from the action, pardon my ignorance if I’m not aware of the details of the Integration Flow API – I only saw a one-liner on it in one of the slide decks from a recent Info day. Is this the IntegrationRuntimeArtifacts entity of the OData service, or this is something that is not out yet?
Hi Eng. The API is not out yet. Scheduled for Q3, but no final word yet.
D'oh, seems to be Q4 now :-/
Hi Morten, Been away for a while. It's unfortunate to hear the delay, thanks for the update anyway!
Thanks for sharing that testing is relevant to create a good service.
SAP does provide the testing service but it is a different ball game where SAP get an Iflow with test data mocks it. And it is not for creating 100 test cases since you will be paying pr x messages.
The mock services together with the iflow API would give a good flow to create own application but no SAP system.
Thanks for your thoughts. My view of the regression testing (Testing as a Service) is more to ensure the regular rolling updates do not break any of the customer's flow.
Unit testing is slightly different and applicable even when the integration is not productive yet - I would want to be able to test something that I just build even if I do not have the connected systems.
Thanks for your inputs yet again! Some thoughts from our side.
The preferred tooling for SAP Cloud Platform Integration would be web UI first and over time the only one as this is desired by most of our cloud customers for developing their integration scenarios.
This is an interesting point you bring about the unit test framework. Being able to test the integration as its being developed by some kind of simulation is very much desired. This is already on our radar and the Web based test automation support is planned for 2018. We already have this capability introduced in message mapping where your can simulate the mapping with sample source and target messages to validate the correctness of your mapping transformations.
Hope this helps,
Sorry for the delayed response. Thank you for your comment.
Simulation of the message mapping only covers one small piece of the entire flow. There are other elements that needs to be tested (Groovy scripts - see comment here, routers, splitter, etc) as well as the whole flow plus mocking the endpoints. Will the "Web based test automation support planned for 2018" cover such scope?
Regarding Web UI being desired - my question again is what is the sample size and type of the customer base? Is it truly reflective of the true needs of the SAP community especially the developers who will be the ones doing the nitty gritty work?
Hi Eng Swee,
Just one correction - IFTT supports all middleware software and CPI adapter for IFTT is going to be released in Q4 2017 🙂
For any news and updates please have a look at:
Great stuff, Michal. Glad to know IFTT will have such a capability!