Download - Agile testing
![Page 1: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/1.jpg)
Agile Testing Guiding Principles & Enabling Practices
Raj Indugula [email protected]
www.lithespeed.com
![Page 2: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/2.jpg)
ON-‐DECK AT-‐BAT DONE
What is the problem context?
Concluding thoughts. Any ques<ons?
What are the guiding principles of Agile Tes<ng ?
What are the enabling prac<ces?
![Page 3: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/3.jpg)
Agile Approach
Cost Time
Scope
Quality
Maximize value and quality within specified project constraints
![Page 4: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/4.jpg)
Shared Context drives Quality
Individuals and interactions…
Working software…
Customer collaboration…
Responding to change…
![Page 5: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/5.jpg)
Integrated Teams & Iterative Delivery Challenges
Ensure that the evolving software does not regress? Test in-cycle? Bridge the communication gap between Bus./Testing/Dev.? Adopt automation strategies? Deal with performance issues identified late? …
How do we…
![Page 6: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/6.jpg)
ON-‐DECK AT-‐BAT DONE
What is the problem context?
Concluding thoughts. Any ques<ons?
What are the guiding principles of Agile Tes<ng ?
What are the enabling prac<ces?
![Page 7: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/7.jpg)
Move Quality Upstream
• Testing not a trailing activity
• QA leads the Sprint by providing guidance and feedback on the business needs of the emerging product
Small paradigm shift with profound implications
![Page 8: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/8.jpg)
Testing is Continuous, Not a Phase
http://testobsessed.com/
Continuous testing is the only way to ensure continuous progress
![Page 9: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/9.jpg)
Testing is Collaborative
• Quality is everyone’s problem, not just of the testers
• Testing is the responsibility of the whole
team
The whole team can only go as fast as the slowest part
![Page 10: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/10.jpg)
Tests represent Customer Expectations
• Shared understanding of what it means
for a story to be done
Oops…that’s not what I intended!
![Page 11: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/11.jpg)
Quick Feedback
• Faster feedback loops increase Agility – the ability to respond to change
• Test automation provides rapid feedback on how the software is behaving
How long does the team have to wait for information about how the software is behaving?
![Page 12: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/12.jpg)
“Leave No Broken Windows”
• Fix bugs as they are found
• The sooner you find a defect, the cheaper it is to fix
Keep the code clean
![Page 13: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/13.jpg)
It isn't Done until it’s…
“Done Done”
Coded Tested Done
![Page 14: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/14.jpg)
Test-Driven
Defining tests with the requirements guides development
http://testobsessed.com/
![Page 15: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/15.jpg)
ON-‐DECK AT-‐BAT DONE
What is the problem context?
Concluding thoughts. Any ques<ons?
What are the guiding principles of Agile Tes<ng ?
What are the enabling prac<ces?
ATDD
TDD
Other prac<ces
![Page 16: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/16.jpg)
Automated Testing is at the heart of Agility
Unit Tests/Component Tests
Cucumber, FitNesse, SpecFlow
xUnit, Mocks
Selenium
Developer-centric (Are we building the code right?)
Business-centric (Are we building the right code?)
Adaptation of Mike Cohn's test automation pyramid
Exploratory Testing
GUI Tests
Acceptance Tests
![Page 17: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/17.jpg)
But, in reality…
Unit Tests
Acceptance Tests
Automated GUI Tests
Manual Scripted Testing
Automated Testing is NOT Selenium-type UI record & play tests
![Page 18: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/18.jpg)
What are acceptance tests?
• Tests that demonstrate business intent of
system from end user’s point of view
• Black-box testing
![Page 19: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/19.jpg)
What is Acceptance Test Driven Development (ATDD)?
A practice in which the whole team collaboratively discusses acceptance criteria, with examples, and then distills them into a set of concrete acceptance tests before development begins. - Elisabeth Hendrickson
![Page 20: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/20.jpg)
1. Elicit details from the business stakeholders about their expecta<ons
2. Dis<ll acceptance criteria into automatable tests expressed in a natural language
3. Wire the tests to SUT with “glue” code (as part of implementa<on)
![Page 21: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/21.jpg)
The tactical act of getting a story ready is often performed as a two sprint look-a-head by an “amigos” (BA, QA, Dev) team
Select User Story 999 for Sprint n+2
Re-estimate it, sharpen story & acceptance criteria
Create testable example and other supporting material for 999 Develop
User Story 999
Sprint n Sprint n + 1 Sprint n + 2
The PO and 3+ Amigos look-a-head and select story 999
for inclusion for Sprint n + 2. They do cleanup on the story.
The 3+ Amigos further support the story and the PO
gets appropriate sign offs.
Story 999 makes it’s way into a sprint and it is built.
Sample Story Maturation Look-A-Head
![Page 22: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/22.jpg)
Epics, Features, Stories
Epics
Features
Stories
Product backlog
Priority
![Page 23: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/23.jpg)
Modern Agile Acceptance Model
Conditions of Satisfaction – Broad Terms
Acceptance Criteria – Further Refined
Examples – Actual scenarios or data
Executable Examples – Ready to automate
![Page 24: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/24.jpg)
Testable Examples in Gherkin • Executable Example, Making it Repeatable • Examples that can be executed are the final step
Given the “Unregistered User” user has navigated to the “register” page When entering “newuser” in the “Username” field And entering “abc123” in the “Password” field And entering “abc123” in the “Confirm Password” field And pressing the “Register” button Then the text “Thank you for Registering” should appear on page And the URL should end with “use/accountPage”
Can be used for both manual testing and automation
![Page 25: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/25.jpg)
Automated Acceptance Tests
Tool (Cucumber, SpecFlow, FitNesse)
Specification expressed in
common language
“Glue” code that ties specification to
System Under Test
![Page 26: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/26.jpg)
Business Analyst Develop usage scenarios
Developer
Create and maintain acceptance test “glue” code that ties test specification to system under test
Tester Create and execute tests to simulate usage scenarios; Automate regression testing
• Should be an integral part of every iteration/sprint, not just a trailing activity
• Vital not only to prove completeness of a feature in repeatable fashion, but also to prove that software does not regress as it evolves
• Success depends on cooperation & collaboration
Testing Collaboratively
![Page 27: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/27.jpg)
Benefits of ATDD
• Improved requirements elicitation
• Consensus between BA/QA/Dev on the story helps prevent bugs & gives clear target for development
• Reuse of Acceptance Scenarios for all phases of testing
• Creates clear examples that everyone understands; discovers some problems before any development
![Page 28: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/28.jpg)
ON-‐DECK AT-‐BAT DONE
What is the problem context?
Concluding thoughts. Any ques<ons?
What are the guiding principles of Agile Tes<ng ?
What are the enabling prac<ces?
ATDD
TDD
Other prac<ces
![Page 29: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/29.jpg)
What are unit tests?
Developer tests that determine whether the smallest piece of testable software in an application is behaving as expected Key Characteristics • Quick to execute • Easy to execute • Isolated • Leave the system under test unaltered
![Page 30: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/30.jpg)
Test Doubles (Mocks)
Used to isolate unit tests form external dependencies
Why use them?
• Ease of setup • Fast executing • To work with a subsystem that doesn’t exist • Simulate various execution paths of external
system
![Page 31: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/31.jpg)
What is Test Driven Development (TDD)?
Write a new test
Red (Failing Test)
Write Code
Green (Test Passes)
Benefits • Better design • Supports change • Prevents gold-plating • Prevent bugs • Discover bugs
![Page 32: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/32.jpg)
ATDD/TDD Cycle
![Page 33: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/33.jpg)
ON-‐DECK AT-‐BAT DONE
What is the problem context?
Concluding thoughts. Any ques<ons?
What are the guiding principles of Agile Tes<ng ?
What are the enabling prac<ces?
ATDD
TDD
Other prac<ces
![Page 34: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/34.jpg)
Requirements gathering Application Development
Source Control
Continuous Integration (CI) Server
Continuously commit changes
and merge changes from others
Pull changes, Build, run tests
Deploy to higher environment
Poll for changes
Development tasks from requirements
test scenarios from business requirements for acceptance criteria
Acceptance Test Environment - Test harness - Tests (automated + manual)
Execute acceptance tests against the deployed application
QA Environment
Deployable artifacts
Build Automation & Continuous Integration
![Page 35: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/35.jpg)
ON-‐DECK AT-‐BAT DONE
What is the problem context?
Concluding thoughts. Any ques<ons?
What are the guiding principles of Agile Tes<ng ?
What are the enabling prac<ces?
![Page 36: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/36.jpg)
Some Barriers to Adoption
Developer : “I’m a developer, not a tester” Tester: “I’m a tester, not a developer” Management: “Why does Dev help with testing, when we have QA?”
• Necessitates behavioral change • Requires discipline • Needs generalizing specialists • Needs collaboration across roles
![Page 37: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/37.jpg)
Agile Testing is supported by…
MINDSET SKILLSET
TOOLSET
• Everyone is responsible to ensure quality
• Testing is not a phase
• Testers are not sole gate-keepers of quality
• Customer collaboration
• Requirements elicitation
• Writing test requirements that assist developers • Skills to do
different types of testing • Automation • Effective
communicator and team player
• Development and build tools (source control, CI, code coverage) • Requirements and examples (mock-ups, testable
examples) • Multi-level test automation
![Page 38: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/38.jpg)
Business Req.
User Stories
Unit Tests
Automated Unit & Acceptance Tests
Con<nuous Integra<on
SoXware Applica<on
Fixtures
Business-‐facing Tests
Developer Tester PO/BA
![Page 39: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/39.jpg)
…the job of testing is to prevent defects, not just to find them
- Mary Poppendieck
![Page 40: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/40.jpg)
Thanks!
40
![Page 41: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/41.jpg)
Resources
41
![Page 42: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/42.jpg)
Some Tools (open source)
• Unit testing: JUnit, Mockito, EasyMock
• Acceptance testing: FitNesse Cucumber
• GUI testing: Selenium, Sahi
• Javascript testing: Jasmine, Qunit
• Testing the database: DBUnit, SQLUnit, DBFit
• Performance testing: JUnitPerf, JMeter
• Usability testing: Manual unfortunately
![Page 43: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/43.jpg)
Some Tools (open source)
• Unit testing: MSTest, NUnit, Moq
• Acceptance testing: SpecFlow
• GUI testing: Selenium
• Javascript testing: Chutzpa
• Testing the database: Tsqlt, SSDT SQL Test
• Performance testing: JetBrains, VisualStudio 2013, SQLServerProfiler, SQLLoadTest
• Usability testing: Manual unfortunately
![Page 44: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/44.jpg)
Agile Software Development
• Extreme Programming Explained - Kent Beck • TDD: A Practical Guide – Dave Astels • Refactoring – Martin Fowler • Agile Estimating and Planning – Mike Cohn • Pragmatic Project Automation – Pragmatic Prog.
44
![Page 45: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/45.jpg)
Acceptance Testing
• Bridging the Communications Gap – Gojko Adzic • Agile Testing – Lisa Crispin and Janet Gregory • The Cucumber Book - Wynne M. and Hellesoy A. Gherkin
https://github.com/aslakhellesoy/cucumber/wiki/gherkin Cucumber
http://cukes.info/ https://github.com/aslakhellesoy/cucumber/wiki/
![Page 46: Agile testing](https://reader033.vdocument.in/reader033/viewer/2022051610/54878b93b4af9f5f388b5998/html5/thumbnails/46.jpg)
TDD/Refactoring
• TDD: By Example - Kent Beck • TDD: A Practical Guide – Dave Astels § The Art of Agile Development – James Shore • Refactoring – Martin Fowler • Working Effectively with Legacy Code – Mike Feathers • Refactoring to Patterns – Joshua Kerievsky • xprogramming.com, refactoring.com, testdriven.com