
Motivation
DevOps concept & making ABAP Test Cockpit ( ATC) more relevant for Development teams via automated unit tests!!!
Above motivation lead us to implement CDS View unit test practices using Test Double Framework within S/4 HANA transformation program. The key challenge was to explore effective ways to implement this & within Net weaver 7.52 by which we could fulfill the below needs
- Need to Execute the unit test before CDS Views are released to QA/Integration system
- Need to Execute only unit test relevant to the CDS views which are part of current transport release
- Need for possibility to exempt for certain CDS Views for which unit test might not be required
We could be gaining more efficiency in Unit Testing in SAP world if we address these above needs. Similar feature exists for ABAP unit and currently CDS View Unit test classes are yet to be supported , these requirement's made us to explore a more pragmatic approach.
I elaborate the approach in detail below with pre-requisites & custom check's logic
Approach
Pre-requisites:
Standard Pre-Requisites:
- Enable ATC check to be executed during Transport release - Transport tool Integration
Additional Pre-requisites:
- Store all the Unit tests in a single development package
Approach:
High level overview of the Process
Our approach with this New Custom Check ( For knowing how to create custom check please refer Blog post on how to create new custom check) & Integrated with ATC via Check variant is to
- Identify the CDS View which is being released as part of ATC check run during TR or Task release
- Qualify the CDS View if it should have CDS View unit or not based on the its creation date ( Creation date >= Configured date)
- Identify the related CDS View unit test class stored in a single development package specific to the CDS View under test (CUT) which is being released
- Execute the unit test for this CDS View as part of ATC check & return results of unit test
Finally, Transport / Task released with Unit Tested & CDS View unit test results determine if the TR / Task release could happen or not!!!We are live with this solution and thanks to my team who could make this happen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |