Increase Developer Productivity and Code Quality of Custom Scripts in SAP Cloud Integration
Event: SAP Devtoberfest 2023
Date: September 27, 2023
Speaker: Vadim Klimov
Session: Increase developer productivity and code quality of custom scripts in SAP Cloud Integration
transitive dependencies management • Dependency graph visualisation • Dependency caching • Multi-repository support Code editor / IDE • Code completion • Code templates • Code refactoring • Integration with development infrastructure • Extensibility Version control • Traceability of implemented changes • Ability to recover previous versions of a code base («time travelling» in a code repository) • Atomic changes • Branching and merging Coding assistant • Rapid code generation powered by AI technologies (not to be confused with code templates to generate boilerplate code) • Code generation from natural language comments and code fragments • Generated code snippets are coherent with existing code base • Many popular coding assistants offer extensive support for Java, but have limited or no support for Groovy, reducing accuracy and quality of generated code suggestions • Built-in web-based script editor in SAP Cloud Integration is for simple scripts development and minor code changes, not for complex developments
early. Verify compliance to development guidelines. Dynamic code analysis Analyze behaviour of a script at runtime. Dependency analysis Analyze dependencies used by a script. Performance analysis Analyze resources consumption by a script at runtime. Benchmark script execution.
Analysis of 3rd party open source dependencies, incl. transitive dependencies, for security vulnerabilities detection and license compliance • Commonly based on analysis of dependencies declared in Gradle or Maven build configuration scripts Static code analysis • Early detection of code weaknesses, incl. potential performance flaws and security vulnerabilities (Static Application Security Testing) • Enforcement of compliance with style guides, incl. naming conventions • Historic analysis and comparison with previous runs
Identify script performance by conducting precise method-level measurements Mutation testing • Detection of code mutations that are not captured by unit tests • Tools used in a Java ecosystem (e.g., PIT) are based on byte code mutations. This requires source code compilation, whereas scripts used in SAP Cloud Integration are not compiled pre- emptively Performance analysis: profiling • Detect performance bottlenecks or suboptimal use of resources such as CPU, memory, I/O Unit testing • Validate that changes introduced to a script behave as expected • Regression testing • Prefer declarative definition of unit tests • Historic analysis and comparison with previous runs • Integration of unit testing and code coverage tools • Inability to execute performance measurements on a worker node • Inaccuracy in reproducing runtime of a worker node in a local environment • Inaccuracy in emulating entire real-world workload processed by a worker node • Due to constraints that impact representativeness of measurements, results must be interpreted as relative, not absolute
rights reserved. See Legal Notice on www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to SAP Materials for general audiences. Contact information: Vadim Klimov (he/him) Integration Architect https://www.linkedin.com/in/vadim-klimov Thank you