This document discusses test driven development (TDD) and quality assurance practices for agile software development. It introduces Synerzip, an offshore software development partner, and describes their agile development lifecycle involving short iterations with user stories, estimation, testing, and customer approval. The benefits of practices like TDD, continuous integration, unit testing, and automation are outlined. Challenges with implementation and common mistakes are also discussed. Various testing methodologies and tools used in agile projects are defined.
2. Confidential
Today’s Discussion
• Synerzip Introduction
• Agile Development Lifecycle
• Test Driven Development
– Case for TDD & Continuous Integration
– User Acceptance Testing
– Functional Testing
– Unit Testing
– Regression Testing
– Common Tools & Useful Resources
• Q & A
3. Confidential
Synerzip in a Nut-shell
1. Software development partner for small/mid-sized
technology companies
• Focus: small/mid-sized technology companies
• Deep experience in product development, testing, & deployment
• Handles full software development life cycle
• Technology and industry domain agnostic
2. Actually reduces risk of development/delivery
• Experienced software management team
• Brings in appropriate level of engineering discipline
• Practices Agile development – responsive & disciplined
3. Reduces cost – dual-shore team, 50% cost advantage
4. Offers long term flexibility – allows (facilitates) taking
offshore team captive
5. Confidential
Today’s Discussion
• Synerzip Introduction
• Agile Development Lifecycle
• Test Driven Development
– Case for TDD & Continuous Integration
– User Acceptance Testing
– Functional Testing
– Unit Testing
– Regression Testing
– Common Tools & Useful Resources
• Q & A
6. Confidential
Agile Development
• Why agile development?
– Due to a dynamic , ever changing business environment;
requirements change.
– Innovation happens when requirements change.
– Agile not only allows but encourages requirements to change.
– Agile is an iterative show and build process. The customer gets to
see some new functionality at the end of each short iteration. Ideas
evolve and new requirements get generated when the customer
sees something working.
– Shorter the iteration closer the compliance with requirements.
• Challenges of agile development
– In a short iteration of 3 weeks if 1 week is required for integration,
testing and deployment then only 2 weeks are left for actual coding
or development work.
– There is an interdependence of TDD and automation.
8. Confidential
Agile Lifecycle – Iterations & QA
Small
Release
Unit and
Automated
F & R/ UA
Testing
Iteration
Release
Planning
User Stories
Requirements
User
Acceptance
Testing
Test Scenarios
Iteration Plan
Confident
Estimates
Feedback
/Functional
Regression
Testing
Customer Approval
9. Confidential
Testing Terminology
• Unit testing – testing a code component or class.
– Coverage is measured against lines of code
• Functional testing - testing against required
functionality by going through the same steps that
an end-user will execute.
– Coverage is measured against requirements
• Regression testing – when functional testing is
carried out again after fixing defects to ensure that
no new bugs get introduced.
• User acceptance testing – a subset of functional
test cases that form the basis on which the release
is accepted by the customer.
10. Confidential
Agile Lifecycle - Roles
Iteration zero Iteration n Final Iteration
Product
Owner
Requirements
analysis
Review of product
demo and changes
User acceptance
testing and sign
off.
Project
Manager
Estimation and
planning
Monitoring and re-
estimation
Monitoring and
release notes
Architect Prototype or POC
design
Designing and code
review
Design documents
Developer Estimation,
understanding
requirements and
coding POC
Writing unit tests and
code. Writing build
automation script
Fixing bugs and
documentation.
QA Writing test cases Testing and some
automation
Filing bugs and
regression testing
11. Confidential
Today’s Discussion
• Synerzip Introduction
• Agile Development Lifecycle
• Test Driven Development
– Case for TDD & Continuous Integration
– User Acceptance Testing
– Functional Testing
– Unit Testing
– Regression Testing
– Common Tools & Useful Resources
• Q & A
12. Confidential
What is TDD?
• Test Driven Development (TDD) means
capturing the intent of requirements in the
form of a test case before starting to code
• Test case could be a manual test case or an
automated test script
• Test case could be a functional or a user-
acceptance or a unit test
14. Confidential
TDD in Practice
Value of TDD – especially in Agile
• Tests are more explicit expression of requirements
• Earlier defect detection by frequent testing
• Ensures better coverage - don’t end up having
superfluous code, without tests
Challenges – team resistance & reluctance?
• ROI is realized in the long term – in maint phase
• Extra coding effort seems unjustified in the
beginning
• Easier said than done- difficult to implement
• Developer resistance
15. Confidential
Role of Continuous Integration
• Agile development has its roots in lean
manufacturing. “Stop the line” principle at Toyota is
implemented in software development by making
automated tests a part of the build process.
• The build fails if even one test fails. This reduces
the time-lag between detection of defect and fixing
of defect. Ensures timely corrective action.
• This also ensures that tests are updated to stay in
sync with changing requirements.
16. Confidential
User Acceptance Testing (FIT)
• What Works
– Wiki based tables are used to express and share
requirements or user stories
– Test fixtures are written only for significant and complex
requirements. Ready made test fixtures are used for
simple requirements
– Subwikis are used to build test suites
• What Doesn’t
– Customer/ product owner doesn’t spend enough time
reviewing the test cases
– Developers spend too much time writing test fixtures
– FIT tables don’t cover unhappy path. A use case can go
wrong in many ways.
17. Confidential
Manual Functional Testing
• What Works
– Better expression of requirements by insisting on writing the test
cases up front (Note: 70% of defects arise due to faulty
requirements)
– Better understanding of the requirements by the QA staff
– Examples or test data
– QA should be a part of the Product Management/BA team
• What Doesn’t
– No time allocated by the customer and product owner to review the
test cases
– Test cases aren’t updated as new requirements evolve. Need to
make sure QA team and Product Mgmt/BAs are always in sync
– Test cases are at a high level – but difficult to be useful for
generating test data
18. Confidential
Unit Testing
• What Works
– Write tests first
– Write tests only for the complex methods/units
– No significant or complex code is written unless there is
a unit test already written for it.
• What Doesn’t
– Writing tests later after the code is written.
– Completing the formality of writing unit tests for each
and every method including accessor methods.
– Writing unit tests for legacy code
• Case Study: A customer started TDD practice by writing unit
tests for all the legacy code and ended up testing the tests with
the code.
20. Confidential
Functional/ Regression Testing
• What Works
– Automating only that functionality which has stable
manual test cases
– Test suites that run as a part of the build process
– Test reports automatically published on the wiki
• What Doesn’t
– Trying to automate everything. Coverage can’t go
beyond 70%
– Tests scripts that are never integrated into a test suite
– Tests are data specific and start breaking when the data
changes
21. Confidential
Continuous Integration
• What Works
– Separate build tasks for unit, regression and UAT
– Quick builds facilitate frequent (continuous) integration
– Reports are a part of the build
• What Doesn’t
– No distinction in dev, prod and test builds.
– Long and tedious builds. Developer’s attention gets
diverted if it takes any longer than 30 secs.
– Absence of teardowns to cancel all setup data
– Tasks are dropped if the build fails
– Untested dependencies
22. Confidential
Common Tools
Tools
Manual Jira, Bugzilla, Test Director
Unit Junit, Nunit, HttpUnit, DbUnit,
SpringUnit etc.
Functional and
regression
Watir, Selenium, QTP, AutoIt,
Winrunner, RSpec, Tkl/Tk
Performance Loadrunner, OpenSta, jMeter,
User Acceptance Fitnesse
Continuous
Integration
Maven,Cruise Control, Luntbuild, PMD,
FindBugs, Jalopy (automated code
review), Clover (code coverage)
24. Confidential
Today’s Discussion
• Synerzip Introduction
• Agile Development Lifecycle
• Test Driven Development
– Case for TDD & Continuous Integration
– User Acceptance Testing
– Functional Testing
– Unit Testing
– Regression Testing
– Common Tools & Useful Resources
• Q & A