SlideShare una empresa de Scribd logo
1 de 36
1
Prepared By:
Gervais Johnson
601 Montgomery St, Suite 650, San Francisco, CA 94111 | 415-678-1350 | www.MatrixRes.com
TestOps
Test Driven Development
and Shift Left
2
Today’s Presenter
Gervais (Jay) Johnson, Agile Delivery Manager
 Leads, trains, coaches teams and companies in Agile development and adoption
 Architect, Application and Software Engineer, and Agile Leader for cross sector and
industry including NASA and DoD organizations
 IBM - 16 Year Veteran and Thought Leader
 30 Years developing applications and changing the world
 Education and certifications
 Certified Scrum Master and Scrum Professional
 Scrum Master, Scrum Developer, Agile Expert Certified
 PMI Project Management Professional
 Scaled Agile Framework Program Consultant
 IBM Certified Consultant, PM, SPSS, Agile Expert
 Six Sigma Black Belt
3
Outline
 What is TestOps
 TestOps Ecosystem
 Shift Left Movement
 Test Driven Development (TDD)
 Behavior Driven Development (BDD)
 Acceptance Test Driven Development (ATDD)
 Continuous Testing (CT)
 TDD Details
 Open Discussion
4
Introductions
 What is your name?
 What is your role?
 What prior Testing and Agile experience do you
have?
 0 to 10
 0 = Brand New
 10 = Testing Expert
5 MATRIX Confidential
The Agile Manifesto- “BE AGILE”
We are uncovering better ways of developing software by doing it and helping others do it.
“Responding to change over
following a plan”
“Customer collaboration
over contract negotiation”
“Working software over
comprehensive
documentation”
“Individuals and interactions
over process and tools”
Values
“The most efficient and
effective method of
conveying information to
and within a development
team is face-to-face
conversation.”
“Welcome changing
requirements, even late in
development. Agile
processes harness change
for the customer's
competitive advantage.”
“Working software is the
primary measure of
progress.”
“Agile processes promote
sustainable development.
The sponsors, developers,
and users should be able to
maintain a constant pace
indefinitely.”
“Our highest priority is to
satisfy the customer
through early and
continuous delivery of
valuable software.”
“Deliver working software
frequently, from a couple of
weeks to a couple of
months, with a preference
to the shorter timescale.”
“At regular intervals, the
team reflects on how to
become more effective,
then tunes and adjusts its
behavior accordingly.”
“Continuous attention to
technical excellence and
good design enhances
agility.”
“Business people and
developers must work
together daily throughout
the project.”
“Build projects around
motivated individuals, give
them the environment and
support they need, and trust
them to get the job done,
“Simplicity -- the art of
maximizing the amount of
work not done – is
essential.”
“The best architectures,
requirements, and designs
emerge from self-organizing
teams”
Principles
6
What is TestOps?
Testing never stops, it is continuous and is the fabric of enterprise operations and
the quality glue for Agile + DevOps
7
TestOps Includes Various Testing
Are we building the right
product?
Are we building the product
right?
Business Facing
Technology Facing
Functional, Story &
Prototype Testing
Unit & Component
Testing
Business Facing
Technology Facing
Exploratory &
Usability Testing
Performance, Load
& Security Testing
CritiqueProduct
SupportingtheTeam
8
An Agile TestOps Ecosystem Example A
9
An Agile TestOps Ecosystem Example B
‘Shift Left’ – Operational Concerns
Also BizDevOps and DevOpsSec is becoming an important part of the fabric or glue
10
What is Shift Left Testing?
 "Shift Left" is a QA practice being implemented in high-performninh Agile/DevOps teams
that provides an effective means to perform testing during and in parallel of software
development activities.
– Software Development, test and operations work together to plan, manage and execute automated
and continuous testing to accelerate feedback todevelopers
– The rate of the feedback is determined by an organization’s desiredvelocity
– Technology is used to automate processes and virtualizecomponents
 QA/Testing is performed as a part of the development process (TDD) or as a service
running (BDD or DDD) in parallel to development activities, shifting left accelerates
feedback to developers and improves the quality of code delivered to QA
 Shift left is an essential capability for Agile/DevOps teams and IT Operations teams
11
 Perspectives
– Testing: Begin test executionearlier
– Behavior Design Testing
– A/B Testing
– Feature Driven Testing
– Development: Act on feedback to achieve value
– PM: Resource allocation to address feedback
– Infrastructure: Shift left environments available
early, capacity drives availability
– Deployment: Accelerated capacity to meet test
periodicity
 Activities:
– plan, create and automate integrationtest
cases in advance
– support a periodic cycle of integrationtesting
for the components/applications under
change
– prioritize, process, and resolve feedbackby
development teams within the feedback
period
– plan, automate and deploy components,
applications and virtual services
– plan, create and virtualizecomponent
services relevant to the development
activities
– execute delivery, integration, build, deploy,
testing, feedback and correction during the
defined periodicity.
Whatever testing you can perform shifts left - Integration testing could be your
first step as a means to provide a means to prepare for a formal QA and
reduce bottlenecks associated with Integration testing post development.
What is Left Shifting?
12
Shift Left Planning Workshop – Part of Agile Adoption
Roadmap
Goals and
Assessment
•Client Capabilities: CurrentStatus
•Business Goals for Improvement
•Solution Capability Oriented
•People, Practices, Technology,information
Capability
Priorities
•Best Practices for SolutionCapabilities
•Discussions to refine ObjectiveCapability
•Prioritize Incremental Capabilities
•Vision, User Value, Pain and Complexity
Executive
Sponsor
Review
•Review Outcomes
•Assumptions & Risks
•Gain concurrence
•Identify next steps
Solution
Improvement
Roadmap
•Best Practices for AdoptingSolution
•Identify Key Milestones
•Roadmap activity to define actionableplan
•Define Quick Win Pilot
Day1Day2Day3Day4
Current State
Assessment
Objective & Prioritized
Capabilities
Agile Adoption Roadmap
DraftResults
Detailed 1-3 month roadmap
for initial win. High level
roadmap for remainder of
initiative. Executable week
following the workshop
Theme Activities Objective
13
TDD and BDD Place
• Unit test (Unit)
• Integration test (Collaboration)
• User interface test (Frontend, ex. WatiN)
• Regression test (Continuous Integration)
• …, System, Performance, Stress, Usability, …
Test types:
• Black-box test
• White-box test
The only tests relevant to TDD and BDD is Black-box Unit Testing
14
Feature Driven Development (FDD)
● Is a client-centric, architecture-centric, and pragmatic software
process
● Feature Breakdown Structure (FBS) instead of WBS
● A feature is a small, client-valued function expressed in the form:
<action> the <result> by/for/of/to a <object>
15
Test Driven Development (TDD)
Is a rapid cycle of testing, coding, and refactoring
● Relies on a very short development
cycle
● Developer writes automated test case
first
● Test case defines desired improvement or
new function
● Next develops minimum amount of
code to pass test
● Lastly refactors the new code
to acceptable standards
Code refactoring is a "disciplined technique for restructuring
an existing body of code, altering its internal structure without
changing its external behavior"
16
Behavior Driven Development (BDD)
● Outside-in and pull-based - Wire-frame > Test Cases > Coding
● Multiple-stakeholder, multiple-scale, high-automation
● Describes a cycle of interactions with well-defined outputs
● Results in the delivery of working, tested software that matters
17
BDD and TDD
18
Agile Story and BDD
ID: 27
STORY NAME: Save a list of potential cars for later review
As a: Buyer
I can: Add a car to my wish list
So that: I can review my top choices at a later time.
Acceptance Criteria
Scenario 27.1: Add a car to my wish list
Given: A potential buyer is logged in
And: The car is available for sale
When: The ‘Add to Favorites’ option appears
And: A buyer flags the car for the wish list
Then: The car details are displayed in the wish list
Scenario 27.2: Review list of favorite cars
Given: A potential buyer is logged in
Given: A potential buyer has previously picked some favorite
cars’
And: A buyer clicks on “view my favorites’
When: The buyer views the wish list
And: The car is still available for sale
Then: The buyer can view the car summary in the wish list
Story
As a <role>,
I can <activity>,
so that <business value>
Scenarios
Given <context>
When <event>
Then <outcome>
19
Acceptance Test Driven Development
20
Technical Debt and Testing
TDD
BDD
Source: http://www.slideshare.net/nashjain/inverting-the-testing-pyramid
FDD
21
Automated Testing Across Platforms
Loadster
LogiGear
TestArchitect
Microsoft test tools
QASymphony
Telerik Test Studio
Sauce Labs
Selenium Appium
Synopsys
Xunit SDK
Apache JMeter
Grinder
Gatling
Tsung
LoadRunner
WebLOAD
Appvance
NeoLoad
LoadUI
WAPT
LoadImpact
Rational Performance Tester
Testing Anywhere
22
PVCS
SVN
Artifactory
Splunk
Jenkins Maven
Ant
Puppet
chef
HP ALM
Policy Tester
Selenium
Smart Cloud Control
Desk
PMG
ServiceNow
Microsoft Team Foundation Server
Serena Dimensions
Example Testing Across Platforms
23
TDD History
• Test-driven development (TDD) is a software development technique that uses short
development iterations based on pre-written test cases that define desired
improvements or new functions. Each iteration produces code necessary to pass that
iteration's tests. Finally, the programmer or team refactors the code to accommodate
changes. A key TDD concept is that preparing tests before coding facilitates rapid
feedback changes. Note that test-driven development is a software design method,
not merely a method of testing.
24
TDD Method and Cycle
New
require-
ment
Write
new test
Run
tests
Write
new
code
Run
tests
Refactor
Run
tests
• Write Test Code
– Guarantees that every functional code is
testable
– Provides a specification for the functional code
– Helps to think about design
– Ensure the functional code is tangible
• Write Functional Code
– Fulfill the requirement (test code)
– Write the simplest solution that works
– Leave Improvements for a later step
– The code written is only designed to pass the
test
• no further (and therefore untested code is
not created).
• Refactor
– Clean-up the code (test and functional)
– Make sure the code expresses intent
– Remove code smells
– Re-think the design
– Delete unnecessary code
25
TDD Benefits
0
1
2
3
4
5
6
7
8
9
10
0%
20%
40%
60%
80%
100%
Requirements Coding Integration Testing Support
Thousand$s
%defectscreated
% of Defects Introduced Cost to Fix a Defect
The pain is here! This is too late…
26
TDD Benefits
0%
20%
40%
60%
80%
100%
120%
140%
160%
MS: VS MS: MSN MS:
Windows
IBM: Drivers
Time To Code Feature
Time To Code Feature
using TDD
Defect density of team
Defect density of team
using TDD
Major quality improvement for minor time investment
27
TDD Fundamental Mind Exercise
• When you first start at doing TDD you "know"
what the design should be. You "know" what
code you want to write. So you write a test that
will let you write that bit of code.
• When you do this you aren't really doing TDD –
since you are writing the code first in your mind,
mind change to write test first
• It takes some time and mentoring to realize that
you need to focus on the test first.
• Write the test for the behavior you want - then
write the minimal code needed to make it pass -
then let the design emerge through refactoring.
• Repeat until done.
• TDD and Paired Programming are a great
combination to improve quality and increase
delivery time
28
TDD Adoption Hurdles
• Why, when TDD was born a
decade ago?
– The one and only reason: #1:
Learning curve…
– Infrastructure and willingness
• Why do most developers not
write unit tests, still?
http://weblogs.asp.net/rosherove/archive/2008/09/20/goodbye-mocks-
farewell-stubs.aspx
mocks, stubs, dependency injection, IoC containers, Extract & override
technique, RecordReplay, AAA and more
29
TDD Fundamental Infrastructure
• Interfaces
• Dependency Injection
• Test Doubles (Mock Objects)
• Mocking Framework.
• The builder and fluent
interface patterns.
Either (the old way)
“Mock”
Using Interfaces, Dependency Injection and
Test Doubles (Mock Objects)
Or (the new way)
“Isolate” and “Fake”
Using Typemock Isolator
and AAA - The "Arrange-act-assert" pattern
• Refactoring
30
Why No Unit Testing and no TDD
1. I don’t have time to unit test.
2. The client pays me to develop
code, not write unit test.
3. I am supporting a legacy
application without unit tests.
4. QA and User Acceptance Testing
is far more effective in finding
bugs.
5. I don’t know how to unit test, or I
don’t know how to write good
unit tests.
31
TDD Maturity
• Classicists
– The classical TDD style is to use real objects if possible and a double if
it's awkward to use the real thing. So a classical TDDer would use a real
warehouse and a double for the mail service. The kind of double doesn't
really matter that much.
• Mockist
– A mockist TDD practitioner, however, will always use a mock for any
object with interesting behavior. In this case for both the warehouse and
the mail service.
• Isolator and Fake
– An isolator TDD practitioner, will always “isolate” or “fake” any object
with interesting behavior. In this case for both the warehouse and the
mail service.
The Classicists does White-box Integration testing
First generation TDD
The Mockist does White-box Unit testing
Sencond generation TDD
The Isolator and Fake does Black-box Unit testing
Third generation TDD
32
TDD Maturity, adding BDD
• Behaviour-Driven Development (BDD)
– By Dan North
– BDD is another variation on TDD that tends to use mockist testing
• Test method names should be sentences
• A simple sentence template keeps test methods focused
– This sentence template – The class should do something – means you can only
define a test for the current class. This keeps you focused. If you find yourself
writing a test whose name doesn’t fit this template, it suggests the behavior may
belong elsewhere.
• An expressive test name is helpful when a test fails
– “Behavior” is a more useful word than “test”.
– Determine the next most important behaviour.
– Requirements are behavior, too.
– BDD provides a “ubiquitous language” for analysis.
– Acceptance criteria should be executable.
33
How to start TDD/BDD
• You don’t have to start big
• Start new tasks with TDD
• Add Tests to code that you need to change or maintain – but
only to small parts
• Proof of concept
34
References
• Books
– Test-Driven Development in Microsoft® .NET (http://www.amazon.co.uk/gp/product/0735619484)
– Test-Driven Development by Kent Beck (C++) (http://www.amazon.co.uk/gp/product/0321146530)
– Clean Code by Martin Fowler
– Refactoring by Martin Fowler
– Refactoring of Patterns by Kerievsky
• Blog
– The Typemock Insider Blog (http://blog.typemock.com/)
• Unit test study from Microsoft Research:
– http://research.microsoft.com/en-us/projects/esm/nagappan_tdd.pdf
– https://en.wikipedia.org/wiki/XUnit and https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks
• Typemock
– http://www.typemock.com/
• Unit testing Silverlight:
– http://www.codeplex.com/CThru
• Other links:
– http://en.wikipedia.org/wiki/Test-driven_development
– http://www.testdriven.com/
– http://www.mockobjects.com/ - Online TDD book: http://www.mockobjects.com/book/index.html
– http://www.martinfowler.com/articles/mocksArentStubs.html
– http://dannorth.net/introducing-bdd
– http://behaviour-driven.org/Introduction
35
TesOps Future Topics for Discussion
 Testing Value Chain and Tools Chain
 Test Automation Tools Demo
 TDD and BDD Demo
 Test Environment Management
 Security Testing
 Cloud Testing
 Mobile Testing
 Performance Testing
 Test Data Management
36
Open Forum
Discussion

Más contenido relacionado

La actualidad más candente

Integrating Automated Testing into DevOps
Integrating Automated Testing into DevOpsIntegrating Automated Testing into DevOps
Integrating Automated Testing into DevOpsTechWell
 
End-to-End Quality Approach: 14 Levels of Testing
End-to-End Quality Approach: 14 Levels of TestingEnd-to-End Quality Approach: 14 Levels of Testing
End-to-End Quality Approach: 14 Levels of TestingJosiah Renaudin
 
Testing as a Managed Service using SLAs and KPIs
Testing as a Managed Service using SLAs and KPIsTesting as a Managed Service using SLAs and KPIs
Testing as a Managed Service using SLAs and KPIsProlifics
 
Agile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterAgile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterDeclan Whelan
 
Agile QA and Testing process
Agile QA and Testing processAgile QA and Testing process
Agile QA and Testing processGloria Stoilova
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test AutomationNaveen Kumar Singh
 
Shift Left Testing: A New Paradigm Shift To Quality
Shift Left Testing: A New Paradigm Shift To QualityShift Left Testing: A New Paradigm Shift To Quality
Shift Left Testing: A New Paradigm Shift To QualityPooja Wandile
 
Emerging QA COE Practice by Mukund Wangikar
Emerging QA COE Practice by Mukund WangikarEmerging QA COE Practice by Mukund Wangikar
Emerging QA COE Practice by Mukund WangikarAgile Testing Alliance
 
Shift left - find defects earlier through automated test and deployment
Shift left - find defects earlier through automated test and deploymentShift left - find defects earlier through automated test and deployment
Shift left - find defects earlier through automated test and deploymentClaudia Ring
 
Testing capability ppt
Testing capability pptTesting capability ppt
Testing capability pptanilreddyqa
 
Enterprise QA and Application Testing Services
Enterprise QA and Application Testing ServicesEnterprise QA and Application Testing Services
Enterprise QA and Application Testing ServicesCygnet Infotech
 
Pooja shift left 1.0
Pooja shift left 1.0Pooja shift left 1.0
Pooja shift left 1.0Xebia India
 
Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategytharindakasun
 
How to Get Started with DevSecOps
How to Get Started with DevSecOpsHow to Get Started with DevSecOps
How to Get Started with DevSecOpsCYBRIC
 

La actualidad más candente (20)

Integrating Automated Testing into DevOps
Integrating Automated Testing into DevOpsIntegrating Automated Testing into DevOps
Integrating Automated Testing into DevOps
 
End-to-End Quality Approach: 14 Levels of Testing
End-to-End Quality Approach: 14 Levels of TestingEnd-to-End Quality Approach: 14 Levels of Testing
End-to-End Quality Approach: 14 Levels of Testing
 
Testing as a Managed Service using SLAs and KPIs
Testing as a Managed Service using SLAs and KPIsTesting as a Managed Service using SLAs and KPIs
Testing as a Managed Service using SLAs and KPIs
 
Agile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterAgile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile Tester
 
DevOps introduction
DevOps introductionDevOps introduction
DevOps introduction
 
Agile QA and Testing process
Agile QA and Testing processAgile QA and Testing process
Agile QA and Testing process
 
QA Best Practices in Agile World_new
QA Best Practices in Agile World_newQA Best Practices in Agile World_new
QA Best Practices in Agile World_new
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test Automation
 
Shift Left Testing: A New Paradigm Shift To Quality
Shift Left Testing: A New Paradigm Shift To QualityShift Left Testing: A New Paradigm Shift To Quality
Shift Left Testing: A New Paradigm Shift To Quality
 
Emerging QA COE Practice by Mukund Wangikar
Emerging QA COE Practice by Mukund WangikarEmerging QA COE Practice by Mukund Wangikar
Emerging QA COE Practice by Mukund Wangikar
 
Shift left - find defects earlier through automated test and deployment
Shift left - find defects earlier through automated test and deploymentShift left - find defects earlier through automated test and deployment
Shift left - find defects earlier through automated test and deployment
 
Testing capability ppt
Testing capability pptTesting capability ppt
Testing capability ppt
 
Enterprise QA and Application Testing Services
Enterprise QA and Application Testing ServicesEnterprise QA and Application Testing Services
Enterprise QA and Application Testing Services
 
QA-presentation
QA-presentationQA-presentation
QA-presentation
 
QA process Presentation
QA process PresentationQA process Presentation
QA process Presentation
 
QA Center Of Excellence (TCoE)
QA Center Of Excellence (TCoE)QA Center Of Excellence (TCoE)
QA Center Of Excellence (TCoE)
 
Pooja shift left 1.0
Pooja shift left 1.0Pooja shift left 1.0
Pooja shift left 1.0
 
Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategy
 
How to Get Started with DevSecOps
How to Get Started with DevSecOpsHow to Get Started with DevSecOps
How to Get Started with DevSecOps
 
DevOps
DevOpsDevOps
DevOps
 

Similar a TestOps: Shift Left Testing with TDD and BDD

Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQASymphony
 
Introduction to Agile Software Development Process
Introduction to Agile Software Development ProcessIntroduction to Agile Software Development Process
Introduction to Agile Software Development ProcessSoftware Park Thailand
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingDimitri Ponomareff
 
Benefits of Agile Software Development for Senior Management
Benefits of Agile Software Development for Senior ManagementBenefits of Agile Software Development for Senior Management
Benefits of Agile Software Development for Senior ManagementDavid Updike
 
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystemsTechnical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystemsOutSystems
 
Agile Truths and Misconceptions
Agile Truths and MisconceptionsAgile Truths and Misconceptions
Agile Truths and MisconceptionsRichard Cheng
 
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 EastmanQA or the Highway
 
About Agile & PMI Agile Certified Practitioner (PMI-ACP) Overview
About Agile & PMI Agile Certified Practitioner (PMI-ACP) OverviewAbout Agile & PMI Agile Certified Practitioner (PMI-ACP) Overview
About Agile & PMI Agile Certified Practitioner (PMI-ACP) OverviewAleem Khan
 
Anjali gupta resume
Anjali gupta resumeAnjali gupta resume
Anjali gupta resumeANJALI GUPTA
 
Agile Development Overview
Agile Development OverviewAgile Development Overview
Agile Development OverviewMark Kovacevich
 
Agile software development
Agile software developmentAgile software development
Agile software developmentpradeeppatelpmp
 
Agile Development Overview
Agile Development OverviewAgile Development Overview
Agile Development Overviewguestb4c770
 
Agile Project Management - An introduction to Agile and the new PMI-ACP
Agile Project Management - An introduction to Agile and the new PMI-ACPAgile Project Management - An introduction to Agile and the new PMI-ACP
Agile Project Management - An introduction to Agile and the new PMI-ACPDimitri Ponomareff
 
Critical steps in Determining Your Value Stream Management Solution
Critical steps in Determining Your Value Stream Management SolutionCritical steps in Determining Your Value Stream Management Solution
Critical steps in Determining Your Value Stream Management SolutionDevOps.com
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentNeotys
 
Agile project management using scrum
Agile project management using scrumAgile project management using scrum
Agile project management using scrumPrudentialSolutions
 

Similar a TestOps: Shift Left Testing with TDD and BDD (20)

Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
 
Introduction to Agile Software Development Process
Introduction to Agile Software Development ProcessIntroduction to Agile Software Development Process
Introduction to Agile Software Development Process
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated Testing
 
Benefits of Agile Software Development for Senior Management
Benefits of Agile Software Development for Senior ManagementBenefits of Agile Software Development for Senior Management
Benefits of Agile Software Development for Senior Management
 
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystemsTechnical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
 
Agile Truths and Misconceptions
Agile Truths and MisconceptionsAgile Truths and Misconceptions
Agile Truths and Misconceptions
 
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
 
About Agile & PMI Agile Certified Practitioner (PMI-ACP) Overview
About Agile & PMI Agile Certified Practitioner (PMI-ACP) OverviewAbout Agile & PMI Agile Certified Practitioner (PMI-ACP) Overview
About Agile & PMI Agile Certified Practitioner (PMI-ACP) Overview
 
Agile Development Process
Agile Development ProcessAgile Development Process
Agile Development Process
 
Agile Methodologies
Agile MethodologiesAgile Methodologies
Agile Methodologies
 
Anjali gupta resume
Anjali gupta resumeAnjali gupta resume
Anjali gupta resume
 
Agile Development Overview
Agile Development OverviewAgile Development Overview
Agile Development Overview
 
Agile software development
Agile software developmentAgile software development
Agile software development
 
Agile Development Overview
Agile Development OverviewAgile Development Overview
Agile Development Overview
 
Agile dashboard
Agile dashboardAgile dashboard
Agile dashboard
 
Agile Testing
Agile Testing Agile Testing
Agile Testing
 
Agile Project Management - An introduction to Agile and the new PMI-ACP
Agile Project Management - An introduction to Agile and the new PMI-ACPAgile Project Management - An introduction to Agile and the new PMI-ACP
Agile Project Management - An introduction to Agile and the new PMI-ACP
 
Critical steps in Determining Your Value Stream Management Solution
Critical steps in Determining Your Value Stream Management SolutionCritical steps in Determining Your Value Stream Management Solution
Critical steps in Determining Your Value Stream Management Solution
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
 
Agile project management using scrum
Agile project management using scrumAgile project management using scrum
Agile project management using scrum
 

Más de Gervais Johnson, Advisor

Organize for Agile Adoption and Sustainability
Organize for Agile Adoption and SustainabilityOrganize for Agile Adoption and Sustainability
Organize for Agile Adoption and SustainabilityGervais Johnson, Advisor
 
Agile Enterprise: How Business and Customers Drive Change
Agile Enterprise: How Business and Customers Drive Change Agile Enterprise: How Business and Customers Drive Change
Agile Enterprise: How Business and Customers Drive Change Gervais Johnson, Advisor
 
Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gateway to Agile - Frameworks at TCS/Jile May 8 2019Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gateway to Agile - Frameworks at TCS/Jile May 8 2019Gervais Johnson, Advisor
 
Jurgen Appleo - Shakeup &amp; speedup 20 agile frameworks
Jurgen Appleo - Shakeup &amp; speedup 20   agile frameworksJurgen Appleo - Shakeup &amp; speedup 20   agile frameworks
Jurgen Appleo - Shakeup &amp; speedup 20 agile frameworksGervais Johnson, Advisor
 
Agile Organization Design: How to Optimize Your Organization for Agile
Agile Organization Design: How to Optimize Your Organization for AgileAgile Organization Design: How to Optimize Your Organization for Agile
Agile Organization Design: How to Optimize Your Organization for AgileGervais Johnson, Advisor
 
Gateway to Agile: Product Discovery - Lean UX and Design Sprints
Gateway to Agile: Product Discovery - Lean UX and Design SprintsGateway to Agile: Product Discovery - Lean UX and Design Sprints
Gateway to Agile: Product Discovery - Lean UX and Design SprintsGervais Johnson, Advisor
 
Gateway to Agile - Happiness and High Performing Teams
Gateway to Agile - Happiness and High Performing TeamsGateway to Agile - Happiness and High Performing Teams
Gateway to Agile - Happiness and High Performing TeamsGervais Johnson, Advisor
 
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing TeamsGateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing TeamsGervais Johnson, Advisor
 
Digital Enterprise Success Depends on DevOps and TestOps
Digital Enterprise Success Depends on DevOps and TestOpsDigital Enterprise Success Depends on DevOps and TestOps
Digital Enterprise Success Depends on DevOps and TestOpsGervais Johnson, Advisor
 

Más de Gervais Johnson, Advisor (16)

Dark Agile Avoidance
Dark Agile AvoidanceDark Agile Avoidance
Dark Agile Avoidance
 
Organize for Agile Adoption and Sustainability
Organize for Agile Adoption and SustainabilityOrganize for Agile Adoption and Sustainability
Organize for Agile Adoption and Sustainability
 
MATRIX Business Agility Seminar June 2019
MATRIX Business Agility Seminar June 2019MATRIX Business Agility Seminar June 2019
MATRIX Business Agility Seminar June 2019
 
Agile Enterprise: How Business and Customers Drive Change
Agile Enterprise: How Business and Customers Drive Change Agile Enterprise: How Business and Customers Drive Change
Agile Enterprise: How Business and Customers Drive Change
 
Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gateway to Agile - Frameworks at TCS/Jile May 8 2019Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gateway to Agile - Frameworks at TCS/Jile May 8 2019
 
Jurgen Appleo - Shakeup &amp; speedup 20 agile frameworks
Jurgen Appleo - Shakeup &amp; speedup 20   agile frameworksJurgen Appleo - Shakeup &amp; speedup 20   agile frameworks
Jurgen Appleo - Shakeup &amp; speedup 20 agile frameworks
 
Agile Organization Design: How to Optimize Your Organization for Agile
Agile Organization Design: How to Optimize Your Organization for AgileAgile Organization Design: How to Optimize Your Organization for Agile
Agile Organization Design: How to Optimize Your Organization for Agile
 
Agile Business Value
Agile Business ValueAgile Business Value
Agile Business Value
 
Agile EcoSystem
Agile EcoSystemAgile EcoSystem
Agile EcoSystem
 
Gateway to Agile: Agile Requirements
Gateway to Agile: Agile Requirements Gateway to Agile: Agile Requirements
Gateway to Agile: Agile Requirements
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
 
Gateway to Agile: Product Discovery - Lean UX and Design Sprints
Gateway to Agile: Product Discovery - Lean UX and Design SprintsGateway to Agile: Product Discovery - Lean UX and Design Sprints
Gateway to Agile: Product Discovery - Lean UX and Design Sprints
 
Gateway to Agile: Taste of Scrum Event
Gateway to Agile: Taste of Scrum EventGateway to Agile: Taste of Scrum Event
Gateway to Agile: Taste of Scrum Event
 
Gateway to Agile - Happiness and High Performing Teams
Gateway to Agile - Happiness and High Performing TeamsGateway to Agile - Happiness and High Performing Teams
Gateway to Agile - Happiness and High Performing Teams
 
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing TeamsGateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
 
Digital Enterprise Success Depends on DevOps and TestOps
Digital Enterprise Success Depends on DevOps and TestOpsDigital Enterprise Success Depends on DevOps and TestOps
Digital Enterprise Success Depends on DevOps and TestOps
 

Último

cse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitycse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitysandeepnani2260
 
Internship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SEInternship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SESaleh Ibne Omar
 
Quality by design.. ppt for RA (1ST SEM
Quality by design.. ppt for  RA (1ST SEMQuality by design.. ppt for  RA (1ST SEM
Quality by design.. ppt for RA (1ST SEMCharmi13
 
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptxerickamwana1
 
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRRINDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRRsarwankumar4524
 
GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE
 
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...Sebastiano Panichella
 
Application of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxApplication of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxRoquia Salam
 
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityDon't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityApp Ethena
 
Chizaram's Women Tech Makers Deck. .pptx
Chizaram's Women Tech Makers Deck.  .pptxChizaram's Women Tech Makers Deck.  .pptx
Chizaram's Women Tech Makers Deck. .pptxogubuikealex
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...漢銘 謝
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRachelAnnTenibroAmaz
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxAsifArshad8
 
proposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerproposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerkumenegertelayegrama
 
A Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air CoolerA Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air Coolerenquirieskenstar
 
General Elections Final Press Noteas per M
General Elections Final Press Noteas per MGeneral Elections Final Press Noteas per M
General Elections Final Press Noteas per MVidyaAdsule1
 
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Sebastiano Panichella
 

Último (17)

cse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitycse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber security
 
Internship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SEInternship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SE
 
Quality by design.. ppt for RA (1ST SEM
Quality by design.. ppt for  RA (1ST SEMQuality by design.. ppt for  RA (1ST SEM
Quality by design.. ppt for RA (1ST SEM
 
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
 
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRRINDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
 
GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024
 
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
 
Application of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxApplication of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptx
 
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityDon't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
 
Chizaram's Women Tech Makers Deck. .pptx
Chizaram's Women Tech Makers Deck.  .pptxChizaram's Women Tech Makers Deck.  .pptx
Chizaram's Women Tech Makers Deck. .pptx
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
 
proposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerproposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeeger
 
A Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air CoolerA Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air Cooler
 
General Elections Final Press Noteas per M
General Elections Final Press Noteas per MGeneral Elections Final Press Noteas per M
General Elections Final Press Noteas per M
 
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
 

TestOps: Shift Left Testing with TDD and BDD

  • 1. 1 Prepared By: Gervais Johnson 601 Montgomery St, Suite 650, San Francisco, CA 94111 | 415-678-1350 | www.MatrixRes.com TestOps Test Driven Development and Shift Left
  • 2. 2 Today’s Presenter Gervais (Jay) Johnson, Agile Delivery Manager  Leads, trains, coaches teams and companies in Agile development and adoption  Architect, Application and Software Engineer, and Agile Leader for cross sector and industry including NASA and DoD organizations  IBM - 16 Year Veteran and Thought Leader  30 Years developing applications and changing the world  Education and certifications  Certified Scrum Master and Scrum Professional  Scrum Master, Scrum Developer, Agile Expert Certified  PMI Project Management Professional  Scaled Agile Framework Program Consultant  IBM Certified Consultant, PM, SPSS, Agile Expert  Six Sigma Black Belt
  • 3. 3 Outline  What is TestOps  TestOps Ecosystem  Shift Left Movement  Test Driven Development (TDD)  Behavior Driven Development (BDD)  Acceptance Test Driven Development (ATDD)  Continuous Testing (CT)  TDD Details  Open Discussion
  • 4. 4 Introductions  What is your name?  What is your role?  What prior Testing and Agile experience do you have?  0 to 10  0 = Brand New  10 = Testing Expert
  • 5. 5 MATRIX Confidential The Agile Manifesto- “BE AGILE” We are uncovering better ways of developing software by doing it and helping others do it. “Responding to change over following a plan” “Customer collaboration over contract negotiation” “Working software over comprehensive documentation” “Individuals and interactions over process and tools” Values “The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.” “Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage.” “Working software is the primary measure of progress.” “Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.” “Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.” “Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.” “At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.” “Continuous attention to technical excellence and good design enhances agility.” “Business people and developers must work together daily throughout the project.” “Build projects around motivated individuals, give them the environment and support they need, and trust them to get the job done, “Simplicity -- the art of maximizing the amount of work not done – is essential.” “The best architectures, requirements, and designs emerge from self-organizing teams” Principles
  • 6. 6 What is TestOps? Testing never stops, it is continuous and is the fabric of enterprise operations and the quality glue for Agile + DevOps
  • 7. 7 TestOps Includes Various Testing Are we building the right product? Are we building the product right? Business Facing Technology Facing Functional, Story & Prototype Testing Unit & Component Testing Business Facing Technology Facing Exploratory & Usability Testing Performance, Load & Security Testing CritiqueProduct SupportingtheTeam
  • 8. 8 An Agile TestOps Ecosystem Example A
  • 9. 9 An Agile TestOps Ecosystem Example B ‘Shift Left’ – Operational Concerns Also BizDevOps and DevOpsSec is becoming an important part of the fabric or glue
  • 10. 10 What is Shift Left Testing?  "Shift Left" is a QA practice being implemented in high-performninh Agile/DevOps teams that provides an effective means to perform testing during and in parallel of software development activities. – Software Development, test and operations work together to plan, manage and execute automated and continuous testing to accelerate feedback todevelopers – The rate of the feedback is determined by an organization’s desiredvelocity – Technology is used to automate processes and virtualizecomponents  QA/Testing is performed as a part of the development process (TDD) or as a service running (BDD or DDD) in parallel to development activities, shifting left accelerates feedback to developers and improves the quality of code delivered to QA  Shift left is an essential capability for Agile/DevOps teams and IT Operations teams
  • 11. 11  Perspectives – Testing: Begin test executionearlier – Behavior Design Testing – A/B Testing – Feature Driven Testing – Development: Act on feedback to achieve value – PM: Resource allocation to address feedback – Infrastructure: Shift left environments available early, capacity drives availability – Deployment: Accelerated capacity to meet test periodicity  Activities: – plan, create and automate integrationtest cases in advance – support a periodic cycle of integrationtesting for the components/applications under change – prioritize, process, and resolve feedbackby development teams within the feedback period – plan, automate and deploy components, applications and virtual services – plan, create and virtualizecomponent services relevant to the development activities – execute delivery, integration, build, deploy, testing, feedback and correction during the defined periodicity. Whatever testing you can perform shifts left - Integration testing could be your first step as a means to provide a means to prepare for a formal QA and reduce bottlenecks associated with Integration testing post development. What is Left Shifting?
  • 12. 12 Shift Left Planning Workshop – Part of Agile Adoption Roadmap Goals and Assessment •Client Capabilities: CurrentStatus •Business Goals for Improvement •Solution Capability Oriented •People, Practices, Technology,information Capability Priorities •Best Practices for SolutionCapabilities •Discussions to refine ObjectiveCapability •Prioritize Incremental Capabilities •Vision, User Value, Pain and Complexity Executive Sponsor Review •Review Outcomes •Assumptions & Risks •Gain concurrence •Identify next steps Solution Improvement Roadmap •Best Practices for AdoptingSolution •Identify Key Milestones •Roadmap activity to define actionableplan •Define Quick Win Pilot Day1Day2Day3Day4 Current State Assessment Objective & Prioritized Capabilities Agile Adoption Roadmap DraftResults Detailed 1-3 month roadmap for initial win. High level roadmap for remainder of initiative. Executable week following the workshop Theme Activities Objective
  • 13. 13 TDD and BDD Place • Unit test (Unit) • Integration test (Collaboration) • User interface test (Frontend, ex. WatiN) • Regression test (Continuous Integration) • …, System, Performance, Stress, Usability, … Test types: • Black-box test • White-box test The only tests relevant to TDD and BDD is Black-box Unit Testing
  • 14. 14 Feature Driven Development (FDD) ● Is a client-centric, architecture-centric, and pragmatic software process ● Feature Breakdown Structure (FBS) instead of WBS ● A feature is a small, client-valued function expressed in the form: <action> the <result> by/for/of/to a <object>
  • 15. 15 Test Driven Development (TDD) Is a rapid cycle of testing, coding, and refactoring ● Relies on a very short development cycle ● Developer writes automated test case first ● Test case defines desired improvement or new function ● Next develops minimum amount of code to pass test ● Lastly refactors the new code to acceptable standards Code refactoring is a "disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior"
  • 16. 16 Behavior Driven Development (BDD) ● Outside-in and pull-based - Wire-frame > Test Cases > Coding ● Multiple-stakeholder, multiple-scale, high-automation ● Describes a cycle of interactions with well-defined outputs ● Results in the delivery of working, tested software that matters
  • 18. 18 Agile Story and BDD ID: 27 STORY NAME: Save a list of potential cars for later review As a: Buyer I can: Add a car to my wish list So that: I can review my top choices at a later time. Acceptance Criteria Scenario 27.1: Add a car to my wish list Given: A potential buyer is logged in And: The car is available for sale When: The ‘Add to Favorites’ option appears And: A buyer flags the car for the wish list Then: The car details are displayed in the wish list Scenario 27.2: Review list of favorite cars Given: A potential buyer is logged in Given: A potential buyer has previously picked some favorite cars’ And: A buyer clicks on “view my favorites’ When: The buyer views the wish list And: The car is still available for sale Then: The buyer can view the car summary in the wish list Story As a <role>, I can <activity>, so that <business value> Scenarios Given <context> When <event> Then <outcome>
  • 20. 20 Technical Debt and Testing TDD BDD Source: http://www.slideshare.net/nashjain/inverting-the-testing-pyramid FDD
  • 21. 21 Automated Testing Across Platforms Loadster LogiGear TestArchitect Microsoft test tools QASymphony Telerik Test Studio Sauce Labs Selenium Appium Synopsys Xunit SDK Apache JMeter Grinder Gatling Tsung LoadRunner WebLOAD Appvance NeoLoad LoadUI WAPT LoadImpact Rational Performance Tester Testing Anywhere
  • 22. 22 PVCS SVN Artifactory Splunk Jenkins Maven Ant Puppet chef HP ALM Policy Tester Selenium Smart Cloud Control Desk PMG ServiceNow Microsoft Team Foundation Server Serena Dimensions Example Testing Across Platforms
  • 23. 23 TDD History • Test-driven development (TDD) is a software development technique that uses short development iterations based on pre-written test cases that define desired improvements or new functions. Each iteration produces code necessary to pass that iteration's tests. Finally, the programmer or team refactors the code to accommodate changes. A key TDD concept is that preparing tests before coding facilitates rapid feedback changes. Note that test-driven development is a software design method, not merely a method of testing.
  • 24. 24 TDD Method and Cycle New require- ment Write new test Run tests Write new code Run tests Refactor Run tests • Write Test Code – Guarantees that every functional code is testable – Provides a specification for the functional code – Helps to think about design – Ensure the functional code is tangible • Write Functional Code – Fulfill the requirement (test code) – Write the simplest solution that works – Leave Improvements for a later step – The code written is only designed to pass the test • no further (and therefore untested code is not created). • Refactor – Clean-up the code (test and functional) – Make sure the code expresses intent – Remove code smells – Re-think the design – Delete unnecessary code
  • 25. 25 TDD Benefits 0 1 2 3 4 5 6 7 8 9 10 0% 20% 40% 60% 80% 100% Requirements Coding Integration Testing Support Thousand$s %defectscreated % of Defects Introduced Cost to Fix a Defect The pain is here! This is too late…
  • 26. 26 TDD Benefits 0% 20% 40% 60% 80% 100% 120% 140% 160% MS: VS MS: MSN MS: Windows IBM: Drivers Time To Code Feature Time To Code Feature using TDD Defect density of team Defect density of team using TDD Major quality improvement for minor time investment
  • 27. 27 TDD Fundamental Mind Exercise • When you first start at doing TDD you "know" what the design should be. You "know" what code you want to write. So you write a test that will let you write that bit of code. • When you do this you aren't really doing TDD – since you are writing the code first in your mind, mind change to write test first • It takes some time and mentoring to realize that you need to focus on the test first. • Write the test for the behavior you want - then write the minimal code needed to make it pass - then let the design emerge through refactoring. • Repeat until done. • TDD and Paired Programming are a great combination to improve quality and increase delivery time
  • 28. 28 TDD Adoption Hurdles • Why, when TDD was born a decade ago? – The one and only reason: #1: Learning curve… – Infrastructure and willingness • Why do most developers not write unit tests, still? http://weblogs.asp.net/rosherove/archive/2008/09/20/goodbye-mocks- farewell-stubs.aspx mocks, stubs, dependency injection, IoC containers, Extract & override technique, RecordReplay, AAA and more
  • 29. 29 TDD Fundamental Infrastructure • Interfaces • Dependency Injection • Test Doubles (Mock Objects) • Mocking Framework. • The builder and fluent interface patterns. Either (the old way) “Mock” Using Interfaces, Dependency Injection and Test Doubles (Mock Objects) Or (the new way) “Isolate” and “Fake” Using Typemock Isolator and AAA - The "Arrange-act-assert" pattern • Refactoring
  • 30. 30 Why No Unit Testing and no TDD 1. I don’t have time to unit test. 2. The client pays me to develop code, not write unit test. 3. I am supporting a legacy application without unit tests. 4. QA and User Acceptance Testing is far more effective in finding bugs. 5. I don’t know how to unit test, or I don’t know how to write good unit tests.
  • 31. 31 TDD Maturity • Classicists – The classical TDD style is to use real objects if possible and a double if it's awkward to use the real thing. So a classical TDDer would use a real warehouse and a double for the mail service. The kind of double doesn't really matter that much. • Mockist – A mockist TDD practitioner, however, will always use a mock for any object with interesting behavior. In this case for both the warehouse and the mail service. • Isolator and Fake – An isolator TDD practitioner, will always “isolate” or “fake” any object with interesting behavior. In this case for both the warehouse and the mail service. The Classicists does White-box Integration testing First generation TDD The Mockist does White-box Unit testing Sencond generation TDD The Isolator and Fake does Black-box Unit testing Third generation TDD
  • 32. 32 TDD Maturity, adding BDD • Behaviour-Driven Development (BDD) – By Dan North – BDD is another variation on TDD that tends to use mockist testing • Test method names should be sentences • A simple sentence template keeps test methods focused – This sentence template – The class should do something – means you can only define a test for the current class. This keeps you focused. If you find yourself writing a test whose name doesn’t fit this template, it suggests the behavior may belong elsewhere. • An expressive test name is helpful when a test fails – “Behavior” is a more useful word than “test”. – Determine the next most important behaviour. – Requirements are behavior, too. – BDD provides a “ubiquitous language” for analysis. – Acceptance criteria should be executable.
  • 33. 33 How to start TDD/BDD • You don’t have to start big • Start new tasks with TDD • Add Tests to code that you need to change or maintain – but only to small parts • Proof of concept
  • 34. 34 References • Books – Test-Driven Development in Microsoft® .NET (http://www.amazon.co.uk/gp/product/0735619484) – Test-Driven Development by Kent Beck (C++) (http://www.amazon.co.uk/gp/product/0321146530) – Clean Code by Martin Fowler – Refactoring by Martin Fowler – Refactoring of Patterns by Kerievsky • Blog – The Typemock Insider Blog (http://blog.typemock.com/) • Unit test study from Microsoft Research: – http://research.microsoft.com/en-us/projects/esm/nagappan_tdd.pdf – https://en.wikipedia.org/wiki/XUnit and https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks • Typemock – http://www.typemock.com/ • Unit testing Silverlight: – http://www.codeplex.com/CThru • Other links: – http://en.wikipedia.org/wiki/Test-driven_development – http://www.testdriven.com/ – http://www.mockobjects.com/ - Online TDD book: http://www.mockobjects.com/book/index.html – http://www.martinfowler.com/articles/mocksArentStubs.html – http://dannorth.net/introducing-bdd – http://behaviour-driven.org/Introduction
  • 35. 35 TesOps Future Topics for Discussion  Testing Value Chain and Tools Chain  Test Automation Tools Demo  TDD and BDD Demo  Test Environment Management  Security Testing  Cloud Testing  Mobile Testing  Performance Testing  Test Data Management