SlideShare a Scribd company logo
1 of 19
Deutschsprachige SAP® Anwendergruppe
Test Driven Development in ABAP
Christian Drumm, FACTUR Billing Solutions GmbH
Thomas Fiedler, SAP SE
Agile Software Development
 Agile principles
 Agile processes
 Agile methods
Re-
factoring
Scrum
Continuous
Integration
XP…
Kanban
Pair pro-
gramming
Unit
Tests
Test Driven Development – Introduction
 Approach
1. Implement test
2. Implement application logic
3. Refactor
 Advantages
> Software architecture
> Quality
> Maintainability
> Tests as documentation
3
Red
GreenRefactor
Test Driven Development – Tools
 ABAP Unit
> xUnit implementation in ABAO
test_method1( )
test_method2( )
> setup( )  test_method3( )  teardown( )
test_method4( )
test_methodN( )
 Integrated into SE80 and ABAP in Eclipse
> Execute tests on class and package level
> Test coverage analysis
 Integrated into ABAP Test Cockpit
4
Test Driven Development – Examples
5
Data access and business logic
mixed within one method.
Test Driven Development – Examples
6
Simple unit test.
Test Driven Development – Examples
7
Data access using a data access
class and preparation for
dependency injection.
Mock implementation of data
access class.
Test Driven Development in practice
 Independent developments vs. extensions of the SAP standard
> Usage in independent developments is straightforward
> Usage to extend SAP standard sometimes very difficult (e.g. BAdIS)
 Legacy code vs. new code
> TDD only possible for new code
> TDD for legacy code may require fundamental changes to software architecture
 Possibility of TDD depends on the used frameworks / APIs
> BOL layer in CRM is very suitable for TDD
> TDD in the context of e.g. the business partner BAPIs is virtually impossible
8
The biggest issue when writing Unit Tests
9
Unit Test
Application
Code
Dependent
Components
Configuration
User Interface
Customizing
Database
access
Remote Call
Unknown
Functions
The biggest issue when writing Unit Tests
10
Unit Test
Application
Code
Dependent
Components
Configuration
User Interface
Customizing
Database
access
Remote Call
Unknown
Functions
Mocking
Example: Currency Conversion
11
Conversion-
rate
Application
Currency
Converter
Unit Test Mock
Code Example (Application Code)
12
„Dependency Injection“ to control
dependencies between
components
Decoupling via interfaces
Code Example (Test Code)
13
Code Example (Test Code with Mock)
14
SAP Test Double
Framework
What about Legacy
Code ?
15
Application Code Test Code
Code Example (Legacy Code)
16
Application Code Test Code
Code Replacement via Test-Seams
17
References
 Getting Started with ABAP Testing and Troubleshooting - http://scn.sap.com/docs/DOC-24152
 Introdcution to the SAP Test Double Framework - http://scn.sap.com/docs/DOC-61154
 ABAP in Eclipse SCN community - http://scn.sap.com/community/abap/eclipse
18
Die vorliegende Präsentation ist urheberrechtlich geschützt (Copyright). Alle Rechte liegen, soweit nicht ausdrücklich anders gekennzeichnet, bei der Deutschsprachigen SAP-Anwendergruppe e. V..
Jedwede unerlaubte Verwendung ist nicht gestattet. Dies gilt insbesondere für die Vervielfältigung, Verbreitung, Übersetzung oder die Verwendung in elektronischen Systemen / digitalen Medien.
 Deutschsprachige SAP® Anwendergruppe e.V.
Altrottstraße 34a
D-69190 Walldorf
 Tel.: +49-(0)6227-358 09-58
Fax: +49-(0)6227-358 09-59
E-Mail: info@dsag.de
Web: www.dsag.de
 DSAG in Österreich
Tel.: +43-(0)1-310 13 76
E-Mail: info@dsag.at
Web: www.dsag.at
 DSAG in der Schweiz
Tel.: +41-(0)31-311 10 03
E-Mail: info@dsag-ev.ch
Web: www.dsag-ev.ch
© DSAG e.V.
Kontakt DSAG

More Related Content

What's hot

Test Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutionsTest Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutionsQuontra Solutions
 
Rational Functional Tester
Rational Functional TesterRational Functional Tester
Rational Functional TesterRavi Anand
 
Regression Tests with Symfony - Example
Regression Tests with Symfony - ExampleRegression Tests with Symfony - Example
Regression Tests with Symfony - ExampleJoachim Unger
 
Aspires Testing Services Presentation
Aspires Testing Services PresentationAspires Testing Services Presentation
Aspires Testing Services PresentationVasanthmusic
 
Automation with bpt methodology
Automation with bpt methodologyAutomation with bpt methodology
Automation with bpt methodologyGopi Nath
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsSteven Li
 
Framework for Web Automation Testing
Framework for Web Automation TestingFramework for Web Automation Testing
Framework for Web Automation TestingTaras Lytvyn
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comIdexcel Technologies
 
QTP&UFT Automation Framework
QTP&UFT Automation FrameworkQTP&UFT Automation Framework
QTP&UFT Automation FrameworkYu Tao Zhang
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementationBharathi Krishnamurthi
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testingpriya_trivedi
 
A Test Automation Framework
A Test Automation FrameworkA Test Automation Framework
A Test Automation FrameworkGregory Solovey
 
Automated software testing
Automated software testingAutomated software testing
Automated software testingMD ISLAM
 
API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...SlideTeam
 
Business Process Testing -BPT
Business Process Testing -BPT Business Process Testing -BPT
Business Process Testing -BPT Archana Survase
 

What's hot (20)

Test Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutionsTest Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutions
 
Rational Functional Tester
Rational Functional TesterRational Functional Tester
Rational Functional Tester
 
Regression Tests with Symfony - Example
Regression Tests with Symfony - ExampleRegression Tests with Symfony - Example
Regression Tests with Symfony - Example
 
Aspires Testing Services Presentation
Aspires Testing Services PresentationAspires Testing Services Presentation
Aspires Testing Services Presentation
 
Automation Framework/QTP Framework
Automation Framework/QTP FrameworkAutomation Framework/QTP Framework
Automation Framework/QTP Framework
 
Automation with bpt methodology
Automation with bpt methodologyAutomation with bpt methodology
Automation with bpt methodology
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementations
 
Framework for Web Automation Testing
Framework for Web Automation TestingFramework for Web Automation Testing
Framework for Web Automation Testing
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.com
 
QTP&UFT Automation Framework
QTP&UFT Automation FrameworkQTP&UFT Automation Framework
QTP&UFT Automation Framework
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementation
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testing
 
VIJAYKUMAR-CV
VIJAYKUMAR-CVVIJAYKUMAR-CV
VIJAYKUMAR-CV
 
A Test Automation Framework
A Test Automation FrameworkA Test Automation Framework
A Test Automation Framework
 
Automated software testing
Automated software testingAutomated software testing
Automated software testing
 
API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...
 
Rima Dasgupta_CV
Rima Dasgupta_CVRima Dasgupta_CV
Rima Dasgupta_CV
 
Business Process Testing -BPT
Business Process Testing -BPT Business Process Testing -BPT
Business Process Testing -BPT
 
ALM with TFS 2010
ALM with TFS 2010ALM with TFS 2010
ALM with TFS 2010
 
Business Process Testing
Business Process TestingBusiness Process Testing
Business Process Testing
 

Similar to Test Driven Development #sitFRA

ABAPCodeRetreat - TDD Intro by Damir Majer
ABAPCodeRetreat - TDD Intro by Damir MajerABAPCodeRetreat - TDD Intro by Damir Majer
ABAPCodeRetreat - TDD Intro by Damir MajerABAPCodeRetreat
 
Accelerating SAP transformations with Micro Focus
Accelerating SAP transformations with Micro FocusAccelerating SAP transformations with Micro Focus
Accelerating SAP transformations with Micro FocusChristian Schuetz
 
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16AppDynamics
 
To Scale Test Automation for DevOps, Avoid These Anti-Patterns
To Scale Test Automation for DevOps, Avoid These Anti-PatternsTo Scale Test Automation for DevOps, Avoid These Anti-Patterns
To Scale Test Automation for DevOps, Avoid These Anti-PatternsDevOps.com
 
Keyword Driven Automation
Keyword Driven AutomationKeyword Driven Automation
Keyword Driven AutomationPankaj Goel
 
How to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingHow to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingAcquia
 
Automation Best Practices.pptx
Automation Best Practices.pptxAutomation Best Practices.pptx
Automation Best Practices.pptxpavelpopov43
 
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang PhiIntroduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang PhiHo Chi Minh City Software Testing Club
 
Test automation wipro
Test automation   wiproTest automation   wipro
Test automation wiproambreprasad77
 
Dops 1033 dev-ops_review_final
Dops 1033 dev-ops_review_finalDops 1033 dev-ops_review_final
Dops 1033 dev-ops_review_finalDaniel Berg
 
Track g semiconductor test program - testinsight
Track g  semiconductor test program - testinsightTrack g  semiconductor test program - testinsight
Track g semiconductor test program - testinsightchiportal
 
Service Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on DemandService Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on DemandErika Barron
 
Acceptance Testing Driven Development, TDD
Acceptance Testing Driven Development, TDDAcceptance Testing Driven Development, TDD
Acceptance Testing Driven Development, TDDLaurent PY
 
DevOps Powered by Splunk
DevOps Powered by SplunkDevOps Powered by Splunk
DevOps Powered by SplunkSplunk
 
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline BottlenecksUsing Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline BottlenecksIBM UrbanCode Products
 
Unit 9 and Unit 10.pptx
Unit 9 and Unit 10.pptxUnit 9 and Unit 10.pptx
Unit 9 and Unit 10.pptxReshmaGummadi1
 
Framework For Automation Testing Practice Sharing
Framework For Automation Testing Practice SharingFramework For Automation Testing Practice Sharing
Framework For Automation Testing Practice SharingKMS Technology
 
Automation testing
Automation testingAutomation testing
Automation testingTomy Rhymond
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choicetoddbr
 

Similar to Test Driven Development #sitFRA (20)

ABAPCodeRetreat - TDD Intro by Damir Majer
ABAPCodeRetreat - TDD Intro by Damir MajerABAPCodeRetreat - TDD Intro by Damir Majer
ABAPCodeRetreat - TDD Intro by Damir Majer
 
Accelerating SAP transformations with Micro Focus
Accelerating SAP transformations with Micro FocusAccelerating SAP transformations with Micro Focus
Accelerating SAP transformations with Micro Focus
 
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16
How CapitalOne Transformed DevTest or Continuous Delivery - AppSphere16
 
To Scale Test Automation for DevOps, Avoid These Anti-Patterns
To Scale Test Automation for DevOps, Avoid These Anti-PatternsTo Scale Test Automation for DevOps, Avoid These Anti-Patterns
To Scale Test Automation for DevOps, Avoid These Anti-Patterns
 
Keyword Driven Automation
Keyword Driven AutomationKeyword Driven Automation
Keyword Driven Automation
 
How to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingHow to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated Testing
 
Automation Best Practices.pptx
Automation Best Practices.pptxAutomation Best Practices.pptx
Automation Best Practices.pptx
 
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang PhiIntroduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
 
Test automation wipro
Test automation   wiproTest automation   wipro
Test automation wipro
 
Dops 1033 dev-ops_review_final
Dops 1033 dev-ops_review_finalDops 1033 dev-ops_review_final
Dops 1033 dev-ops_review_final
 
Track g semiconductor test program - testinsight
Track g  semiconductor test program - testinsightTrack g  semiconductor test program - testinsight
Track g semiconductor test program - testinsight
 
Service Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on DemandService Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on Demand
 
Acceptance Testing Driven Development, TDD
Acceptance Testing Driven Development, TDDAcceptance Testing Driven Development, TDD
Acceptance Testing Driven Development, TDD
 
QAIBP
QAIBPQAIBP
QAIBP
 
DevOps Powered by Splunk
DevOps Powered by SplunkDevOps Powered by Splunk
DevOps Powered by Splunk
 
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline BottlenecksUsing Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
 
Unit 9 and Unit 10.pptx
Unit 9 and Unit 10.pptxUnit 9 and Unit 10.pptx
Unit 9 and Unit 10.pptx
 
Framework For Automation Testing Practice Sharing
Framework For Automation Testing Practice SharingFramework For Automation Testing Practice Sharing
Framework For Automation Testing Practice Sharing
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 

Recently uploaded

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

Test Driven Development #sitFRA

  • 1. Deutschsprachige SAP® Anwendergruppe Test Driven Development in ABAP Christian Drumm, FACTUR Billing Solutions GmbH Thomas Fiedler, SAP SE
  • 2. Agile Software Development  Agile principles  Agile processes  Agile methods Re- factoring Scrum Continuous Integration XP… Kanban Pair pro- gramming Unit Tests
  • 3. Test Driven Development – Introduction  Approach 1. Implement test 2. Implement application logic 3. Refactor  Advantages > Software architecture > Quality > Maintainability > Tests as documentation 3 Red GreenRefactor
  • 4. Test Driven Development – Tools  ABAP Unit > xUnit implementation in ABAO test_method1( ) test_method2( ) > setup( )  test_method3( )  teardown( ) test_method4( ) test_methodN( )  Integrated into SE80 and ABAP in Eclipse > Execute tests on class and package level > Test coverage analysis  Integrated into ABAP Test Cockpit 4
  • 5. Test Driven Development – Examples 5 Data access and business logic mixed within one method.
  • 6. Test Driven Development – Examples 6 Simple unit test.
  • 7. Test Driven Development – Examples 7 Data access using a data access class and preparation for dependency injection. Mock implementation of data access class.
  • 8. Test Driven Development in practice  Independent developments vs. extensions of the SAP standard > Usage in independent developments is straightforward > Usage to extend SAP standard sometimes very difficult (e.g. BAdIS)  Legacy code vs. new code > TDD only possible for new code > TDD for legacy code may require fundamental changes to software architecture  Possibility of TDD depends on the used frameworks / APIs > BOL layer in CRM is very suitable for TDD > TDD in the context of e.g. the business partner BAPIs is virtually impossible 8
  • 9. The biggest issue when writing Unit Tests 9 Unit Test Application Code Dependent Components Configuration User Interface Customizing Database access Remote Call Unknown Functions
  • 10. The biggest issue when writing Unit Tests 10 Unit Test Application Code Dependent Components Configuration User Interface Customizing Database access Remote Call Unknown Functions Mocking
  • 12. Code Example (Application Code) 12 „Dependency Injection“ to control dependencies between components Decoupling via interfaces
  • 13. Code Example (Test Code) 13
  • 14. Code Example (Test Code with Mock) 14 SAP Test Double Framework
  • 16. Application Code Test Code Code Example (Legacy Code) 16
  • 17. Application Code Test Code Code Replacement via Test-Seams 17
  • 18. References  Getting Started with ABAP Testing and Troubleshooting - http://scn.sap.com/docs/DOC-24152  Introdcution to the SAP Test Double Framework - http://scn.sap.com/docs/DOC-61154  ABAP in Eclipse SCN community - http://scn.sap.com/community/abap/eclipse 18
  • 19. Die vorliegende Präsentation ist urheberrechtlich geschützt (Copyright). Alle Rechte liegen, soweit nicht ausdrücklich anders gekennzeichnet, bei der Deutschsprachigen SAP-Anwendergruppe e. V.. Jedwede unerlaubte Verwendung ist nicht gestattet. Dies gilt insbesondere für die Vervielfältigung, Verbreitung, Übersetzung oder die Verwendung in elektronischen Systemen / digitalen Medien.  Deutschsprachige SAP® Anwendergruppe e.V. Altrottstraße 34a D-69190 Walldorf  Tel.: +49-(0)6227-358 09-58 Fax: +49-(0)6227-358 09-59 E-Mail: info@dsag.de Web: www.dsag.de  DSAG in Österreich Tel.: +43-(0)1-310 13 76 E-Mail: info@dsag.at Web: www.dsag.at  DSAG in der Schweiz Tel.: +41-(0)31-311 10 03 E-Mail: info@dsag-ev.ch Web: www.dsag-ev.ch © DSAG e.V. Kontakt DSAG

Editor's Notes

  1. Softwarearchitektur Seperation of Concerns (One Responsibility Principle); z.B. Trennung von Datenzugriff und Verarbeitungslogik  Datenzugriffsklasse KISS-Prinzip