SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurPriyadarshini T
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdfOffsiteNOC
 
Einstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfEinstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfCloudMetic
 
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsMUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsUniversity of Antwerp
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityRandy Shoup
 
Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easymichealwillson701
 
Revolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridRevolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridMathew Thomas
 
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...MyFAA
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleShane Coughlan
 
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxCYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxBarakaMuyengi
 
8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.Ritesh Kanjee
 
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Inc
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startMaxim Salnikov
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...Maxim Salnikov
 
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfMind IT Systems
 
VuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckVuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckNaval Singh
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJpolinaucc
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfICS
 

Dernier (20)

MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf
 
Einstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfEinstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdf
 
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsMUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easy
 
Revolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridRevolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM Grid
 
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scale
 
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxCYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
 
8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.
 
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to start
 
20140812 - OBD2 Solution
20140812 - OBD2 Solution20140812 - OBD2 Solution
20140812 - OBD2 Solution
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
 
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
 
VuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckVuNet software organisation powerpoint deck
VuNet software organisation powerpoint deck
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJ
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.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

Notes de l'éditeur

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