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

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
 

What's hot (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
 

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

Similar to 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
 

Recently uploaded

%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
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%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
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
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
 

Recently uploaded (20)

%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
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%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
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
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 🔝✔️✔️
 

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

Editor's Notes

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