"Agile Software Engineering" Overview for external offering of ASE ABAP Juergen Heymann, CPO Software Engineering
There are many ingredients for successful software projects Experienced Developers Domain Knowledge Architecture & Design Project & risk management Coding Standards Many Tools 2012 SAP AG. All rights reserved. 2
Two dimensions of success Do the Right Thing Do It Right Design Thinking Agile Software Engineering 2012 SAP AG. All rights reserved. 3
Do It Right Isn t Scrum* enough? Scrum is a framework that's centered on project management techniques and deliberately omits any technical practices. what happened is that they did not pay enough attention to the internal quality of their software We need agile engineering practices to complement Scrum http://www.martinfowler.com/bliki/flaccidscrum.html * or any other new development process? 2012 SAP AG. All rights reserved. 4
What is Agile Software Engineering? Agile Software Engineering comprises the values, principles and technical practices Scrum* TDD Unit Test Test Isolation Refactoring that a developer needs to know to work successfully in a lean and agile context. ATDD Pair Programming Clean Code Retrospectives Continuous Integration Planning Exploratory Testing Team Work Automated UI Testing Backlog Estimation * Scrum or any other agile / iterative process 2012 SAP AG. All rights reserved. 5
Test First Test Driven Development Write the code Test fails Test First TDD gives you trust in your code Refactor All tests pass Repeat Write test Enables to change code & clean up Living documentation of developer's intent Outside-in development better API design Integration New Requirements Divide Test-last didn t help us. It takes too much time to make code testable afterwards, and therefore it is often not done. 2012 SAP AG. All rights reserved. 6
Test Isolation Dependencies Matter I cannot test because I need an SRM system with full master data Currently, a component I depend on does not work 2012 SAP AG. All rights reserved. 7
Test Isolation example: Stock Application What is the problem? Portfolio Stock Stock Quote Service no stable values call is expensi ve under constructi on Quote Service WebService in the internet 2012 SAP AG. All rights reserved. 8 slow cannot be provoked to raise an exception
Testing Stock Isolating against StockQuoteService Test Case <<interface>> StockQuoteService Stock Quote Service Isolation YahooStockQuoteService WebService in the internet 2012 SAP AG. All rights reserved. 9
Testing Stock Isolating against StockQuoteService Test Case <<interface>> StockQuoteService Stock Quote Service YahooStockQuoteService WebService in the internet Isolation TestDouble_StockQuoteService Return x Always returns a defined value and fast 2012 SAP AG. All rights reserved. 10
"Never touch a running system?" We keep learning as software evolves How keep the system flexible for change? Can we afford to clean up? Optimal path Today s System The path we took Where we started TDD Safety Net Enables Refactoring Avoid technical debt Sustainable Pace 2012 SAP AG. All rights reserved. 11
Pair Programming Pair Programming Better Code, simpler design Knowledge and skill distribution Reduce risk of single code-ownership Raise discipline for writing clean code Teambuilding Good to work in pairs - get different ideas from the pair. Good way to learn and implement. 2012 SAP AG. All rights reserved. 12
Exploratory testing a novel smart way of manual testing Ad hoc Testing Exploratory Testing Scripted Testing The 'Test Tour' is the key Developed by James Whittaker and best testers at Microsoft Encapsulate years of testing experience Timebox Specific approach to testing focus on specific type of bugs Test Tour Protocol 2012 SAP AG. All rights reserved. 13
Exploratory testing Some Test Tours Landmark Tour: Visit 'landmarks' in different order Finds sequence dependent bugs Fedex Tour: Follow parcels (data): create, edit, delete Focus on data consistency Supermodel Tour: Only focus on looks (UI) UI consistency, guidelines, Anti-Social Tour: Behave like no 'normal user' Stability, error/exception handling, unusual input, 2012 SAP AG. All rights reserved. 14
ASE test practices in combination Coverage of entire functional test pyramid from team perspective Test costs Test coverage 2012 SAP AG. All rights reserved. 15
ASE The ASE Course
ASE Course Structure 5-Day Course with 4 sprints; Different 'flavors' for ABAP, Java, C#,... + 1-3 weeks coaching in own team to learn to apply Minimum Recommend / standard 2012 SAP AG. All rights reserved. 17
ASE Feedback Feedback from participants is consistently very good I feel quite more confident about my engineering skills now. 2012 SAP AG. All rights reserved. 18
Some Success Stories Medium Project 'X' 100 developers Large scale refactoring & rewrites Main focus was on quality and performance ASE pilot in two teams, full rollout April 2011 All Project Goals Were Achieved Usable software after each takt Strong test automation Stable development and test systems at all times No need for long test phase after development Same velocity as before after 3 Takts Small Project 'Y' 20 developers Daily Unit Test Results helped to nail down problems and correct immediately Sprint Review meeting with co-innovation customers strong motivation for the team to hear customers feedback 7 customer meetings with live demo in Q- system within ONE Sprint (4 weeks) in the middle of development cycle WITHOUT any dumps/ problems! Low number of defects found during Scenario Acceptance Test and Customer Acceptance Test 2012 SAP AG. All rights reserved. 19
Status at SAP: Mature Global Initiative Status June 2012 More than 2500 developers trained by June 2012 Existing Tracks: ABAP, Java Web, Java Eclipse Global rollout underway Outlook 2012 / 2013 More developers, remaining locations New tracks: C++, HTML5/JavaScript/mobile External offering of ASE ABAP to customers and partners 2012 SAP AG. All rights reserved. 20
ASE External Offering of ASE ABAP
ASE ABAP Course is offered to SAP Customers & Partners Value Proposition Train your developers to write better code Gain speed and quality at the same time Applicable to all customers / partners who do significant development/extension projects in ABAP General Delivery Concept: Customer / Partner designates own trainers; SAP ASE team trains the trainers Then 'ramp-up' training onsite with experienced SAP ASE ABAP trainers. Local trainers educate their peers. Customer pays license fee for training material. Pilot 2012, GA planned for 2013 Pilot offering: details tbd 2012 SAP AG. All rights reserved. 22
Thank You Contact information: Juergen Heymann ase-education@sap.com
BACKUP
When/where can TDD be used? TDD works very well in most development situations Case Details & Issues What to do 1: Completely new code / product New product from scratch Introduce TDD as global development practice 2: Extension of existing application 3: Major redesign of component / refactoring Significant extensions to existing product New code mostly 'together' and not spread through the old code Components needs redesign / new implementation but keep same API Ensure compatibility and correct implementation TDD for new parts (whenever you create a new class) Develop 'good' automated tests at top API level Record behavior of 'old code' as 'target behavior' that is checked against Develop rewritten code with TDD 4: Small enhancements & Fixes Many small changes in 'old code' When automated tests exist, extend them You can still invest in testability in general. The next test is then cheaper to write. 2012 SAP AG. All rights reserved. 25