SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
Copyright BSG
BSG Grad Share 2014
Computer Science
Plan of Action
• Software Development at BSG
• What is Agile?
• Internal vs. External Quality
• Test Driven Development
(TDD)
• Behaviour Driven Development
(BDD)
• Ping Pong Pairing
• Our Testing Strategy (TDD /
BDD Hybrid)
• Demo
Software Development at BSG
• Agile / Lean Development Methodology (JIRA Greenhopper)
• Architecture and Frameworks used Depend on the Project
 Conventional JSPs and Javascript libraries
 Google Web Toolkit (as used to write Google Wave)
 Tomcat (servlet container) or full application server
 JPA, Hibernate, Hibernate Search, Lucene
• Our Developers use Windows, Linux (Ubuntu) and Mac
• Development Tools
 IntelliJ IDEA or Eclipse IDE
 ANT for build scripts
 Junit, Hamcrest, Jmock and Jbehave for automated testing
 Jenkins for continuous integration
 Github for version control
 Team members are active contributors on global forums, such as
 A choice is made for each project
• Database is usually MySQL or client's choice (we have used Oracle quite often, for example)
Java Development at BSG
What is Agile?
• The highest priority of Agile is to satisfy the customer through early and
continuous delivery of valuable software
– Working software is the primary measure of progress of a project
• Common traits amongst agile methodologies include:
– Frequent product releases
– High levels of real‐time collaboration within the project team and with
customers
– Reduced time intensive documentation
– Regular, recurring assessments of value and risk to allow for change
The Agile Manifesto values:
 Individuals and interactions over processes
and tools
 Working software over comprehensive
documentation
 Customer collaboration over contract
negotiation
 Responding to change over following a plan
What makes a
code base agile?
• Properties:
 Lean (least quantity of code to get the job done)
 Well designed (modularised, layered)
 Tested (comprehensive testing strategy)
• Advantages:
 Easy to change without introducing regression issues/bugs
 Easy to maintain (localisation of issues through tests)
 Easy to understand (code = documentation, tests = specification)
• Internal quality determines your ability to
move forward on a project
• It is about “building software in the
right way” which is achieved through
white box testing (e.g. unit tests)
• Internal quality = all the properties of the
software as seen by the developers that
are desirable in order to facilitate the
process of creating a good product:
concision: code does not suffer from
duplication
cohesion: each module / class / routine does
one thing and does it well
low coupling: minimal interdependencies
and interrelation between objects
simplicity
generality: the problem domain bounds are
known and stated
clarity: the code enjoys a good auto
documentation level
• External Quality determines the fulfilment
of stakeholder requirements
• It is about “building the right software”
which is achieved through black box
testing (e.g. acceptance tests)
• External quality = all the properties of the
software as a product that users can
experience and enjoy:
conformity to their expectations (and
evolution thereof)
reliability
accuracy
ease of use and comfort (including response
delay)
robustness (or adaptability to some
unforeseen condition of use)
openness (or adaptability to future
extensions or evolutions)
Internal vs.
External Quality
Test Driven
Development
• Test-driven development (TDD) is a software development process that relies on the
repetition of a very short development cycle:
 First the developer writes an (initially failing) automated test case that defines a desired
improvement or new function
 then produces the minimum amount of code to pass that test
 and finally refactors the new code to acceptable standards
• Advantages:
 Reduced need to use debugger
 Test driven design (design for testability, “listen to the tests”)
 Incremental
 Faster
 Encourages modularisation and decoupling
 All paths through the code are tested
Behaviour Driven Development
• Behaviour-driven development is an
“outside-in” methodology
• It starts at the outside by identifying
business outcomes, and then drills down
into the feature set that will achieve those
outcomes
• Each feature is captured as a “story”,
which defines the scope of the feature
along with its acceptance criteria
• Ubiquitous domain language
• Non-technical / analytical techniques as
well, e.g. feature injection
• Advantages:
Better commitment and buy-in
Right focus
Evolutionary design
Breaking the knowledge silos in
distributed team
Greater ROI
Predictability & confidence
• Pair programming is an agile
software development technique
in which two programmers work
together at one workstation
One, the driver, writes code while the
other, the observer or navigator, reviews
each line of code as it is typed in
The two programmers switch roles
frequently
• Ping Pong Pairing (P3) combines
the concepts of TDD and Pair
programming, therefore mitigating
some of pitfalls while realising the
benefits of both
Better engagement from developers
Complete code coverage
Concision, least quantity of code to
get the job done
Reduced corner cutting
Ping Pong Pair
Programming
Our Testing
Strategy
A hybrid of BDD and TDD. We use a
combination of state and behaviour
verification.
Language through all tests uses the
same Domain Specific Language
(DSL).
Name tests in an intent revealing
way i.e. test<Method and fixture to
test>_should<Expected result>.
What tests do
we write?
• Acceptance tests
• Integration tests
 Query smoke tests
 Query semantics tests
 Round-trip tests
• Unit tests
 Presenter tests
 Service logic tests
 RPC service tests
• Regression tests
A Layered
Architecture
• Presentation layer
 MVP to allow for testing this layer
• Service layer
 Mock out lower layers
• Persistence layer
 Interact with the DB)
Model View Presenter (MVP)
• A design pattern which facilitates unit testing:
 The model contains the data to be handled by the
presenter and displayed in the view.
 The view simply displays data passed to it from the
presenter, and routes events from the user back to
the presenter.
 The presenter fetches data (the model), performs the
required logic with that data, and passes it to the view
to be displayed.
Mocking
• We use JMock
 Behaviour verification
 Fake dependencies
 Return expected values without touching layers below
• Some other popular mocking frameworks include:
 Mockito
 EasyMock
Helpers
Builders - construct and
persist domain objects to be
used in tests.
Matchers - to make
assertions and compare
the state of objects.
• Developers run tests locally before
pushing changes
• Our Continuous Integration (CI)
server runs the tests as well
• We use Jenkins CI
• A build is triggered when code is
pushed to GitHub
• Jenkins compiles the code and
runs all tests
• If any tests fail a notification email
is sent to the team
Running Tests
Testing and Code
Coverage Demo
References
• http://agilemanifesto.org/
• http://c2.com/cgi/wiki?InternalAndExternalQuality
• http://meekrosoft.wordpress.com/2010/10/31/internal-and-external-software-quality
• http://en.wikipedia.org/wiki/Test-driven_development
• http://en.wikipedia.org/wiki/Behavior_Driven_Development
• http://dannorth.net/
• http://blogs.agilefaqs.com/2012/11/11/benefits-of-behavior-driven-development-bdd/
• http://en.wikipedia.org/wiki/Pair_programming
• http://behave.readthedocs.org/en/latest/philosophy.html
Social media - keep in touch
#2014GradShare #AgileDev

Mais conteúdo relacionado

Mais procurados

Unit 5 testing -software quality assurance
Unit 5  testing -software quality assuranceUnit 5  testing -software quality assurance
Unit 5 testing -software quality assurance
gopal10scs185
 
Programming skills for test automation
Programming skills for test automationProgramming skills for test automation
Programming skills for test automation
Romania Testing
 
Best practices for writing good automated tests
Best practices for writing good automated testsBest practices for writing good automated tests
Best practices for writing good automated tests
Felipe Lima
 
Feature driven development (FDD)
Feature driven development (FDD)Feature driven development (FDD)
Feature driven development (FDD)
LennonDukeDuero
 
Complete testing@uma
Complete testing@umaComplete testing@uma
Complete testing@uma
Uma Sapireddy
 

Mais procurados (20)

Unit 5 testing -software quality assurance
Unit 5  testing -software quality assuranceUnit 5  testing -software quality assurance
Unit 5 testing -software quality assurance
 
Programming skills for test automation
Programming skills for test automationProgramming skills for test automation
Programming skills for test automation
 
Software Coding- Software Coding
Software Coding- Software CodingSoftware Coding- Software Coding
Software Coding- Software Coding
 
Kumar_J
Kumar_JKumar_J
Kumar_J
 
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDDTech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
 
Best practices for writing good automated tests
Best practices for writing good automated testsBest practices for writing good automated tests
Best practices for writing good automated tests
 
Feature driven development (FDD)
Feature driven development (FDD)Feature driven development (FDD)
Feature driven development (FDD)
 
"X" Driven-Development Methodologies
"X" Driven-Development Methodologies"X" Driven-Development Methodologies
"X" Driven-Development Methodologies
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
Complete testing@uma
Complete testing@umaComplete testing@uma
Complete testing@uma
 
Bdd for legacy system
Bdd for legacy systemBdd for legacy system
Bdd for legacy system
 
Framework for Web Automation Testing
Framework for Web Automation TestingFramework for Web Automation Testing
Framework for Web Automation Testing
 
Unit 5
Unit 5Unit 5
Unit 5
 
Testing in Agile Projects
Testing in Agile ProjectsTesting in Agile Projects
Testing in Agile Projects
 
Agile Software Development with XP
Agile Software Development with XPAgile Software Development with XP
Agile Software Development with XP
 
Extreme Programming
Extreme ProgrammingExtreme Programming
Extreme Programming
 
Quality Assurance: An Overview
Quality Assurance: An OverviewQuality Assurance: An Overview
Quality Assurance: An Overview
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updated
 
Notes on agile
Notes on agileNotes on agile
Notes on agile
 
Agile Requirements Engineering Practices: An Empirical Study
Agile Requirements Engineering Practices: An Empirical StudyAgile Requirements Engineering Practices: An Empirical Study
Agile Requirements Engineering Practices: An Empirical Study
 

Semelhante a Enter the mind of an Agile Developer

Training Bootcamp - MainframeDevOps.pptx
Training Bootcamp - MainframeDevOps.pptxTraining Bootcamp - MainframeDevOps.pptx
Training Bootcamp - MainframeDevOps.pptx
Nashet Ali
 

Semelhante a Enter the mind of an Agile Developer (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Software Development
Software DevelopmentSoftware Development
Software Development
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Bdd with m spec
Bdd with m specBdd with m spec
Bdd with m spec
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
 
Resume_SameerajaKVL
Resume_SameerajaKVLResume_SameerajaKVL
Resume_SameerajaKVL
 
Introduction to computer programming.pdf
Introduction to computer programming.pdfIntroduction to computer programming.pdf
Introduction to computer programming.pdf
 
manualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdfmanualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdf
 
White box testing
White box testingWhite box testing
White box testing
 
Manual Testing software testing all slide
Manual Testing software testing all slideManual Testing software testing all slide
Manual Testing software testing all slide
 
Sdlc model
Sdlc modelSdlc model
Sdlc model
 
Agile engineering practices
Agile engineering practicesAgile engineering practices
Agile engineering practices
 
SE Unit-1.pptx
SE Unit-1.pptxSE Unit-1.pptx
SE Unit-1.pptx
 
Technical Without Code
Technical Without CodeTechnical Without Code
Technical Without Code
 
Test planning and software's engineering
Test planning and software's engineeringTest planning and software's engineering
Test planning and software's engineering
 
project planning components.pdf
project planning components.pdfproject planning components.pdf
project planning components.pdf
 
Training Bootcamp - MainframeDevOps.pptx
Training Bootcamp - MainframeDevOps.pptxTraining Bootcamp - MainframeDevOps.pptx
Training Bootcamp - MainframeDevOps.pptx
 
Lecture3.se.pptx
Lecture3.se.pptxLecture3.se.pptx
Lecture3.se.pptx
 

Mais de BSGAfrica

Mais de BSGAfrica (20)

Join us as a programme manager
Join us as a programme managerJoin us as a programme manager
Join us as a programme manager
 
Join BSG as a Business Consultant
Join BSG as a Business ConsultantJoin BSG as a Business Consultant
Join BSG as a Business Consultant
 
Empower IT to meet the strategic demands of business
Empower IT to meet the strategic demands of business Empower IT to meet the strategic demands of business
Empower IT to meet the strategic demands of business
 
Empower IT to meet the strategic demands of business
Empower IT to meet the strategic demands of business Empower IT to meet the strategic demands of business
Empower IT to meet the strategic demands of business
 
Taking a data-led approach to increasing profitability
Taking a data-led approach to increasing profitabilityTaking a data-led approach to increasing profitability
Taking a data-led approach to increasing profitability
 
Supporting the delivery of a continent wide mobile financial ecosystem
Supporting the delivery of a continent wide mobile financial ecosystemSupporting the delivery of a continent wide mobile financial ecosystem
Supporting the delivery of a continent wide mobile financial ecosystem
 
Customer experience is your ultimate advantage
Customer experience is your ultimate advantage Customer experience is your ultimate advantage
Customer experience is your ultimate advantage
 
Time to transform your customer programme?
Time to transform your customer programme? Time to transform your customer programme?
Time to transform your customer programme?
 
Your business already has all the information it needs to solve its most impo...
Your business already has all the information it needs to solve its most impo...Your business already has all the information it needs to solve its most impo...
Your business already has all the information it needs to solve its most impo...
 
Fast Fish Forum key take-outs 15 Mar 2017
Fast Fish Forum key take-outs 15 Mar 2017Fast Fish Forum key take-outs 15 Mar 2017
Fast Fish Forum key take-outs 15 Mar 2017
 
Fast fish Forum 15 March 2017
Fast fish Forum 15 March 2017Fast fish Forum 15 March 2017
Fast fish Forum 15 March 2017
 
Fast Fish Forum 15 March 2017
Fast Fish Forum 15 March 2017Fast Fish Forum 15 March 2017
Fast Fish Forum 15 March 2017
 
Fishbowl artefacts: Fast Fish Forum, 16 November 2016, held at BSG
Fishbowl artefacts: Fast Fish Forum, 16 November 2016, held at BSGFishbowl artefacts: Fast Fish Forum, 16 November 2016, held at BSG
Fishbowl artefacts: Fast Fish Forum, 16 November 2016, held at BSG
 
Fast Fish Forum 16 November 2016
Fast Fish Forum 16 November 2016Fast Fish Forum 16 November 2016
Fast Fish Forum 16 November 2016
 
Fast Fish Forum - Change management in the context of innovative change - how...
Fast Fish Forum - Change management in the context of innovative change - how...Fast Fish Forum - Change management in the context of innovative change - how...
Fast Fish Forum - Change management in the context of innovative change - how...
 
Fast Fish Forum Presentation, 20 July 2016
Fast Fish Forum Presentation, 20 July 2016Fast Fish Forum Presentation, 20 July 2016
Fast Fish Forum Presentation, 20 July 2016
 
Architecting IT to enable business success
Architecting IT to enable business successArchitecting IT to enable business success
Architecting IT to enable business success
 
Fast Fish Forum roundtable sessions
Fast Fish Forum roundtable sessionsFast Fish Forum roundtable sessions
Fast Fish Forum roundtable sessions
 
Fast Fish Forum - 6 April 2016
Fast Fish Forum - 6 April 2016Fast Fish Forum - 6 April 2016
Fast Fish Forum - 6 April 2016
 
Top 5 considerations when choosing and managing a technology vendor
Top 5 considerations when choosing and managing a technology vendor Top 5 considerations when choosing and managing a technology vendor
Top 5 considerations when choosing and managing a technology vendor
 

Último

+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
 
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
VictorSzoltysek
 

Último (20)

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
+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...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
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...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
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 🔝✔️✔️
 
%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
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
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
 
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
 
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
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
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-...
 
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
 
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
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 

Enter the mind of an Agile Developer

  • 1. Copyright BSG BSG Grad Share 2014 Computer Science
  • 2. Plan of Action • Software Development at BSG • What is Agile? • Internal vs. External Quality • Test Driven Development (TDD) • Behaviour Driven Development (BDD) • Ping Pong Pairing • Our Testing Strategy (TDD / BDD Hybrid) • Demo
  • 4. • Agile / Lean Development Methodology (JIRA Greenhopper) • Architecture and Frameworks used Depend on the Project  Conventional JSPs and Javascript libraries  Google Web Toolkit (as used to write Google Wave)  Tomcat (servlet container) or full application server  JPA, Hibernate, Hibernate Search, Lucene • Our Developers use Windows, Linux (Ubuntu) and Mac • Development Tools  IntelliJ IDEA or Eclipse IDE  ANT for build scripts  Junit, Hamcrest, Jmock and Jbehave for automated testing  Jenkins for continuous integration  Github for version control  Team members are active contributors on global forums, such as  A choice is made for each project • Database is usually MySQL or client's choice (we have used Oracle quite often, for example) Java Development at BSG
  • 5. What is Agile? • The highest priority of Agile is to satisfy the customer through early and continuous delivery of valuable software – Working software is the primary measure of progress of a project • Common traits amongst agile methodologies include: – Frequent product releases – High levels of real‐time collaboration within the project team and with customers – Reduced time intensive documentation – Regular, recurring assessments of value and risk to allow for change The Agile Manifesto values:  Individuals and interactions over processes and tools  Working software over comprehensive documentation  Customer collaboration over contract negotiation  Responding to change over following a plan
  • 6. What makes a code base agile? • Properties:  Lean (least quantity of code to get the job done)  Well designed (modularised, layered)  Tested (comprehensive testing strategy) • Advantages:  Easy to change without introducing regression issues/bugs  Easy to maintain (localisation of issues through tests)  Easy to understand (code = documentation, tests = specification)
  • 7. • Internal quality determines your ability to move forward on a project • It is about “building software in the right way” which is achieved through white box testing (e.g. unit tests) • Internal quality = all the properties of the software as seen by the developers that are desirable in order to facilitate the process of creating a good product: concision: code does not suffer from duplication cohesion: each module / class / routine does one thing and does it well low coupling: minimal interdependencies and interrelation between objects simplicity generality: the problem domain bounds are known and stated clarity: the code enjoys a good auto documentation level • External Quality determines the fulfilment of stakeholder requirements • It is about “building the right software” which is achieved through black box testing (e.g. acceptance tests) • External quality = all the properties of the software as a product that users can experience and enjoy: conformity to their expectations (and evolution thereof) reliability accuracy ease of use and comfort (including response delay) robustness (or adaptability to some unforeseen condition of use) openness (or adaptability to future extensions or evolutions) Internal vs. External Quality
  • 8. Test Driven Development • Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle:  First the developer writes an (initially failing) automated test case that defines a desired improvement or new function  then produces the minimum amount of code to pass that test  and finally refactors the new code to acceptable standards • Advantages:  Reduced need to use debugger  Test driven design (design for testability, “listen to the tests”)  Incremental  Faster  Encourages modularisation and decoupling  All paths through the code are tested
  • 9. Behaviour Driven Development • Behaviour-driven development is an “outside-in” methodology • It starts at the outside by identifying business outcomes, and then drills down into the feature set that will achieve those outcomes • Each feature is captured as a “story”, which defines the scope of the feature along with its acceptance criteria • Ubiquitous domain language • Non-technical / analytical techniques as well, e.g. feature injection • Advantages: Better commitment and buy-in Right focus Evolutionary design Breaking the knowledge silos in distributed team Greater ROI Predictability & confidence
  • 10. • Pair programming is an agile software development technique in which two programmers work together at one workstation One, the driver, writes code while the other, the observer or navigator, reviews each line of code as it is typed in The two programmers switch roles frequently • Ping Pong Pairing (P3) combines the concepts of TDD and Pair programming, therefore mitigating some of pitfalls while realising the benefits of both Better engagement from developers Complete code coverage Concision, least quantity of code to get the job done Reduced corner cutting Ping Pong Pair Programming
  • 11. Our Testing Strategy A hybrid of BDD and TDD. We use a combination of state and behaviour verification. Language through all tests uses the same Domain Specific Language (DSL). Name tests in an intent revealing way i.e. test<Method and fixture to test>_should<Expected result>.
  • 12. What tests do we write? • Acceptance tests • Integration tests  Query smoke tests  Query semantics tests  Round-trip tests • Unit tests  Presenter tests  Service logic tests  RPC service tests • Regression tests
  • 13. A Layered Architecture • Presentation layer  MVP to allow for testing this layer • Service layer  Mock out lower layers • Persistence layer  Interact with the DB)
  • 14. Model View Presenter (MVP) • A design pattern which facilitates unit testing:  The model contains the data to be handled by the presenter and displayed in the view.  The view simply displays data passed to it from the presenter, and routes events from the user back to the presenter.  The presenter fetches data (the model), performs the required logic with that data, and passes it to the view to be displayed.
  • 15. Mocking • We use JMock  Behaviour verification  Fake dependencies  Return expected values without touching layers below • Some other popular mocking frameworks include:  Mockito  EasyMock
  • 16. Helpers Builders - construct and persist domain objects to be used in tests. Matchers - to make assertions and compare the state of objects.
  • 17. • Developers run tests locally before pushing changes • Our Continuous Integration (CI) server runs the tests as well • We use Jenkins CI • A build is triggered when code is pushed to GitHub • Jenkins compiles the code and runs all tests • If any tests fail a notification email is sent to the team Running Tests
  • 19. References • http://agilemanifesto.org/ • http://c2.com/cgi/wiki?InternalAndExternalQuality • http://meekrosoft.wordpress.com/2010/10/31/internal-and-external-software-quality • http://en.wikipedia.org/wiki/Test-driven_development • http://en.wikipedia.org/wiki/Behavior_Driven_Development • http://dannorth.net/ • http://blogs.agilefaqs.com/2012/11/11/benefits-of-behavior-driven-development-bdd/ • http://en.wikipedia.org/wiki/Pair_programming • http://behave.readthedocs.org/en/latest/philosophy.html
  • 20. Social media - keep in touch #2014GradShare #AgileDev