SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Automation test scripting techniques
Automation test scripting techniquesAutomation test scripting techniques
Automation test scripting techniquesZhu Zhong
 
ABAPCodeRetreat 23.7.2016 - Abap in Eclipse
ABAPCodeRetreat 23.7.2016 - Abap in EclipseABAPCodeRetreat 23.7.2016 - Abap in Eclipse
ABAPCodeRetreat 23.7.2016 - Abap in EclipseABAPCodeRetreat
 
Automated testing - how?
Automated testing - how?Automated testing - how?
Automated testing - how?Markko Paas
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and executionClemens Reijnen
 
Simple Railroad Command Protocol
Simple Railroad Command ProtocolSimple Railroad Command Protocol
Simple Railroad Command ProtocolAnkit Singh
 
Utility of Test Coverage Metrics in TDD
Utility of Test Coverage Metrics in TDDUtility of Test Coverage Metrics in TDD
Utility of Test Coverage Metrics in TDDXP Conference India
 
Performance Regression Analysis: Accomplishments and Challenges
Performance Regression Analysis: Accomplishments and ChallengesPerformance Regression Analysis: Accomplishments and Challenges
Performance Regression Analysis: Accomplishments and Challengescorpaulbezemer
 
Ivan Pashko - Simplifying test automation with design patterns
Ivan Pashko - Simplifying test automation with design patternsIvan Pashko - Simplifying test automation with design patterns
Ivan Pashko - Simplifying test automation with design patternsIevgenii Katsan
 
Automation framework
Automation framework Automation framework
Automation framework ITeLearn
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven TestingMaveryx
 
Practical unit testing in c & c++
Practical unit testing in c & c++Practical unit testing in c & c++
Practical unit testing in c & c++Matt Hargett
 
Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Yves Hoppe
 
Test automation methodologies
Test automation methodologiesTest automation methodologies
Test automation methodologiesMesut Günes
 
Code coverage for automation scripts
Code coverage for automation scriptsCode coverage for automation scripts
Code coverage for automation scriptsvodQA
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testingpriya_trivedi
 

Was ist angesagt? (20)

Automation test scripting techniques
Automation test scripting techniquesAutomation test scripting techniques
Automation test scripting techniques
 
ABAPCodeRetreat 23.7.2016 - Abap in Eclipse
ABAPCodeRetreat 23.7.2016 - Abap in EclipseABAPCodeRetreat 23.7.2016 - Abap in Eclipse
ABAPCodeRetreat 23.7.2016 - Abap in Eclipse
 
Automation Framework/QTP Framework
Automation Framework/QTP FrameworkAutomation Framework/QTP Framework
Automation Framework/QTP Framework
 
Automated testing - how?
Automated testing - how?Automated testing - how?
Automated testing - how?
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and execution
 
Simple Railroad Command Protocol
Simple Railroad Command ProtocolSimple Railroad Command Protocol
Simple Railroad Command Protocol
 
Utility of Test Coverage Metrics in TDD
Utility of Test Coverage Metrics in TDDUtility of Test Coverage Metrics in TDD
Utility of Test Coverage Metrics in TDD
 
Performance Regression Analysis: Accomplishments and Challenges
Performance Regression Analysis: Accomplishments and ChallengesPerformance Regression Analysis: Accomplishments and Challenges
Performance Regression Analysis: Accomplishments and Challenges
 
Ivan Pashko - Simplifying test automation with design patterns
Ivan Pashko - Simplifying test automation with design patternsIvan Pashko - Simplifying test automation with design patterns
Ivan Pashko - Simplifying test automation with design patterns
 
Automation framework
Automation framework Automation framework
Automation framework
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 
Practical unit testing in c & c++
Practical unit testing in c & c++Practical unit testing in c & c++
Practical unit testing in c & c++
 
Automation With A Tool Demo
Automation With A Tool DemoAutomation With A Tool Demo
Automation With A Tool Demo
 
Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016
 
Automation and Technical Debt
Automation and Technical DebtAutomation and Technical Debt
Automation and Technical Debt
 
Introducing fx cop
Introducing fx copIntroducing fx cop
Introducing fx cop
 
Testing_with_TestComplete
Testing_with_TestCompleteTesting_with_TestComplete
Testing_with_TestComplete
 
Test automation methodologies
Test automation methodologiesTest automation methodologies
Test automation methodologies
 
Code coverage for automation scripts
Code coverage for automation scriptsCode coverage for automation scripts
Code coverage for automation scripts
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testing
 

Andere mochten auch

ABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAPABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAPABAPCodeRetreat
 
Test-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate WorkplaceTest-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate WorkplaceAhmed Owian
 
Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven developmentAhmed El-Deeb
 
PHP Experience 2016 - [Workshop] Agile: Test Driven Development
PHP Experience 2016 - [Workshop] Agile: Test Driven DevelopmentPHP Experience 2016 - [Workshop] Agile: Test Driven Development
PHP Experience 2016 - [Workshop] Agile: Test Driven DevelopmentiMasters
 
ABAPCodeRetreat - ABAP PUSH CHANNELS and SAP FIORI
ABAPCodeRetreat -   ABAP PUSH CHANNELS and SAP FIORIABAPCodeRetreat -   ABAP PUSH CHANNELS and SAP FIORI
ABAPCodeRetreat - ABAP PUSH CHANNELS and SAP FIORIABAPCodeRetreat
 
Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)Fatkul Amri
 
Akin bayer. metro c&c
Akin bayer. metro c&cAkin bayer. metro c&c
Akin bayer. metro c&cECR Community
 
Fiddling With Phidgets
Fiddling With PhidgetsFiddling With Phidgets
Fiddling With PhidgetsSteven Peeters
 
Asignacion 2. mapa mental .
Asignacion 2. mapa mental .Asignacion 2. mapa mental .
Asignacion 2. mapa mental .Dilia Padron
 
Zavicajni slikovni rjecnik sibenskoga kraja
Zavicajni slikovni rjecnik sibenskoga krajaZavicajni slikovni rjecnik sibenskoga kraja
Zavicajni slikovni rjecnik sibenskoga krajaNataša Miškov
 
Entrada 1 Matemática
Entrada 1  MatemáticaEntrada 1  Matemática
Entrada 1 MatemáticaGerson Ames
 
Presentacion curso practico de alimentacion crudivegana
Presentacion curso practico de alimentacion crudivegana Presentacion curso practico de alimentacion crudivegana
Presentacion curso practico de alimentacion crudivegana Miguel Cervera Lleonart
 

Andere mochten auch (17)

ABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAPABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
 
ODD: Extending Agile 1.3
ODD: Extending Agile 1.3ODD: Extending Agile 1.3
ODD: Extending Agile 1.3
 
Test-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate WorkplaceTest-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate Workplace
 
Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven development
 
PHP Experience 2016 - [Workshop] Agile: Test Driven Development
PHP Experience 2016 - [Workshop] Agile: Test Driven DevelopmentPHP Experience 2016 - [Workshop] Agile: Test Driven Development
PHP Experience 2016 - [Workshop] Agile: Test Driven Development
 
ABAPCodeRetreat - ABAP PUSH CHANNELS and SAP FIORI
ABAPCodeRetreat -   ABAP PUSH CHANNELS and SAP FIORIABAPCodeRetreat -   ABAP PUSH CHANNELS and SAP FIORI
ABAPCodeRetreat - ABAP PUSH CHANNELS and SAP FIORI
 
Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)
 
Akin bayer. metro c&c
Akin bayer. metro c&cAkin bayer. metro c&c
Akin bayer. metro c&c
 
Fiddling With Phidgets
Fiddling With PhidgetsFiddling With Phidgets
Fiddling With Phidgets
 
Idees per començar
Idees per començarIdees per començar
Idees per començar
 
Asignacion 2. mapa mental .
Asignacion 2. mapa mental .Asignacion 2. mapa mental .
Asignacion 2. mapa mental .
 
Festa della zucca
Festa  della  zuccaFesta  della  zucca
Festa della zucca
 
PORTAFOLIO 1. CANCILLERIAE
PORTAFOLIO 1. CANCILLERIAEPORTAFOLIO 1. CANCILLERIAE
PORTAFOLIO 1. CANCILLERIAE
 
Zavicajni slikovni rjecnik sibenskoga kraja
Zavicajni slikovni rjecnik sibenskoga krajaZavicajni slikovni rjecnik sibenskoga kraja
Zavicajni slikovni rjecnik sibenskoga kraja
 
Soma Company Profile
Soma Company ProfileSoma Company Profile
Soma Company Profile
 
Entrada 1 Matemática
Entrada 1  MatemáticaEntrada 1  Matemática
Entrada 1 Matemática
 
Presentacion curso practico de alimentacion crudivegana
Presentacion curso practico de alimentacion crudivegana Presentacion curso practico de alimentacion crudivegana
Presentacion curso practico de alimentacion crudivegana
 

Ähnlich wie ABAPCodeRetreat 23.7.2016 - TDD

Accelerating SAP transformations with Micro Focus
Accelerating SAP transformations with Micro FocusAccelerating SAP transformations with Micro Focus
Accelerating SAP transformations with Micro FocusChristian Schuetz
 
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
 
Designing a Test Automation Framework By Quontra solutions
Designing a Test Automation Framework By Quontra solutionsDesigning a Test Automation Framework By Quontra solutions
Designing a Test Automation Framework By Quontra solutionsQUONTRASOLUTIONS
 
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
 

Ähnlich wie ABAPCodeRetreat 23.7.2016 - TDD (20)

Accelerating SAP transformations with Micro Focus
Accelerating SAP transformations with Micro FocusAccelerating SAP transformations with Micro Focus
Accelerating SAP transformations with Micro Focus
 
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
 
Designing a Test Automation Framework By Quontra solutions
Designing a Test Automation Framework By Quontra solutionsDesigning a Test Automation Framework By Quontra solutions
Designing a Test Automation Framework By Quontra solutions
 
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
 

Kürzlich hochgeladen

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 

Kürzlich hochgeladen (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

ABAPCodeRetreat 23.7.2016 - TDD

  • 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

Hinweis der Redaktion

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