Agile Developers Go Testing Part II Darcy Alexei November 2010.

Slides:



Advertisements
Similar presentations
Acceptance Testing.
Advertisements

Automated Testing with Sitecore V2
ARCH-05 Application Prophecy UML 101 Peter Varhol Principal Product Manager.
Prashant Lambat Sr. Manager SQA Engineering Symantec Corporation, Pune Date: 29 th January 2011.
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Tools for Agile Development: A Developer’s Perspective Mike Linnen Blog:
Alternate Software Development Methodologies
Non-Coding Activities a Development Team Needs a.k.a ”I don’t code, am I no longer useful?” Maaret Pyhäjärvi| | Twitter: maaretp Test Granlund.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
Tietojärjestelmien peruskurssi Software engineering Malin Brännback.
Improving Process for Better Software. Who We Are An experiential learning program that provides technology solutions for our partners, and real- world.
Computer Engineering 203 R Smith Agile Development 1/ Agile Methods What are Agile Methods? – Extreme Programming is the best known example – SCRUM.
Applied Software Project Management 1 Introduction Dr. Mengxia Zhu Computer Science Department Southern Illinois University Carbondale.
Xtreme Programming. Software Life Cycle The activities that take place between the time software program is first conceived and the time it is finally.
Introduction to Software Testing
Copyright © 2014 ASTQB Presented by Rex Black, CTAL Introducing ISTQB Agile Foundation Extending the ISTQB Program’s Support Further.
Big Projects  Part of this class is about picking a cool software project and building it 1.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 3, Project Organization and Communication.
DEEPAK BHIMARAJU; EDWARD ALLEN TEST CHALLENGES IN THE CLOUD.
Presenter - Donn Felker.  Senior Consultant for Microsoft Gold Certified Partner- Statêra.  8 years of experience in developing and architecting enterprise.
Agile Acceptance Testing Software development by example Gojko Adzic
Chapter 3 – Agile Software Development 1Chapter 3 Agile software development.
Behaviour Driven Development with Cucumber for Java.
INFO 637Lecture #81 Software Engineering Process II Integration and System Testing INFO 637 Glenn Booker.
Building SOLID Software with Dependency Injection Jeremy Rosenberg.
Chapter 3 Agile Software Development (2/2) Yonsei University 2 nd Semester, 2013 Sanghyun Park.
DEPENDENCY INJECTION & INVERSION OF CONTROL. WHAT’S GOING TO BE COVERED Quick intro to C# for Java developers Dependency Injection Inversion of Control.
(A radical interpretation) Tomo Lennox Bow Tie computer services Why Agile Works.
CS 111 – Nov. 22 Chapter 7 Software engineering Systems analysis Commitment –Please read Section 7.4 (only pp ), Sections –Homework #2.
Chapter 3 Agile Software Development (1/2) Yonsei University 2 nd Semester, 2015 Sanghyun Park.
Using Mock Objects with Test Driven Development Justin Kohlhepp
WEP Presentation for non-IT Steps and roles in software development 2. Skills developed in 1 st year 3. What can do a student in 1 st internship.
1 Design and Integration: Part 2. 2 Plus Delta Feedback Reading and lecture repeat Ambiguous questions on quizzes Attendance quizzes Boring white lecture.
Copyright © 2015 Curt Hill Software Development Paradigms What do you need to know?
UHCS 2005, slide 1 About Continuous Integration. UHCS 2005, slide 2 Why do you write Unit Test ? Improve quality/robustness of your code Quick feedback.
Get the New Agile Attitude: Quality First! Object Mentor, Inc. Copyright  by Object Mentor, Inc All Rights Reserved
Chapter 10 Information Systems Development. Learning Objectives Upon successful completion of this chapter, you will be able to: Explain the overall process.
Michel Grootjans Pascal Mestdach.  Michel Grootjans ◦ Enterprise Architect ◦
CSC444F'07Lecture 41 CSC444 Software Engineering Top 10 Practices.
Teaching slides Chapter 9. Chapter 9 Software Testing (Verification & Validation) Introduction Software testing & software engineering methodologies Introduction.
Test Driven Development Introduction Issued date: 8/29/2007 Author: Nguyen Phuc Hai.
“The Role of Experience in Software Testing Practice” A Review of the Article by Armin Beer and Rudolf Ramler By Jason Gero COMP 587 Prof. Lingard Spring.
Northwest Arkansas.Net User Group Jay Smith Tyson Foods, Inc. Unit Testing nUnit, nUnitAsp, nUnitForms.
Successful Software Practice How to successfully work as a team to create software Chris Mendes, Chief Technology Officer Sirca Limited March 2012.
Chapter 8: Maintenance and Software Evolution Ronald J. Leach Copyright Ronald J. Leach, 1997, 2009, 2014,
Introduction to Software Testing Maili Markvardt.
Benjamin Unit Testing & Test-Driven Development for Mere Mortals.
Systems Development Process Developing our own software The Business Perspective Copyright © 2016 Curt Hill.
Introduction to Workbot 2.0 Ryan Li  Test automation  ant the Cucumber.
Leverage your Business with Selenium Automation Testing
Software Engineering (CSI 321)
Test Driven Development 1 November Agenda  What is TDD ?  Steps to start  Refactoring  TDD terminology  Benefits  JUnit  Mocktio  Continuous.
Coding - The Ultimate Survival Skill
Unit Testing & Test-Driven Development for Mere Mortals
Why Technology Startups Should Not Ignore Software Testing.
Advantages OF BDD Testing
Unit Testing & Test-Driven Development for Mere Mortals
Teaching slides Chapter 1.
John D. McGregor Session 9 Testing Vocabulary
Real Testing Scenario Strategy: Bringing this all together – Success!
Introduction to Software Testing
Introducing ISTQB Agile Foundation Extending the ISTQB Program’s Support Further Presented by Rex Black, CTAL Copyright © 2014 ASTQB 1.
CSSSPEC6 SOFTWARE DEVELOPMENT WITH QUALITY ASSURANCE
Coding Concepts (Basics)
CS240: Advanced Programming Concepts
CS101 Introduction to Computing Lecture 20 SW Development Methodology
Unit Testing & Test-Driven Development for Mere Mortals
Bringing more value out of automation testing
Software Development In Agile
Specification by example
Presentation transcript:

Agile Developers Go Testing Part II Darcy Alexei November 2010

What are we talking about today? A lot of things… They may seem disconnected, but they all: –improve software quality –involve testing –done by developers None of them can do the job alone We cannot: –Talk about all of them –Give them equal time

Unit Testing We showed you a very simple unit test example earlier We’ll show you a more difficult example later Let’s step back first

Focus on Quality quotes "...in 2000, during the dot-com bubble,... software quality for North American teams... ranged from 6 defects per function point to less than 3 per 100 function point, a range of 200 to 1. The midpoint is approximately 1 defect per 0.6 to 1.0 function points. This implies that it is common for teams to spend more than 90 percent of their effort fixing defects.”

Logical Connection? “The midpoint is approximately 1 defect per 0.6 to 1.0 function points. This implies that it is common for teams to spend more than 90 percent of their effort fixing defects.” How does he know what they are spending their time on?

Capacity Allocation To Fixing Defects

= Defect Injection Rate

Bugs, Features

Another View Root-cause analysis of established practices E.g. unit testing Five-whys applied to the solution, not the problem The link between the third and fourth whys? Source: Karl Scotland

Compare Two Teams Team A Just finished 40 “features” (units of work) Introduced 10 “bugs” (units of rework) Team B 10 features 8 bugs

Team A Progression Terms beyond the first three are negligible Most defects eliminated in the next 2 releases The 2 nd maintenance release scope is very small Illusion that any team can do it Time spent fixing defects: 25%

Team B Progression The sum of the first 3 terms: only 24.4 (less than half of the total!) The sum of the first 10: approx. 45 Time spent fixing defects: 80%

We want to be more like Team A and certainly not like Team B (or better)

Testing Is what we are talking about today Leaving out other technical practices Remembering that testing itself does not provide quality

Test Matrix Why? UnitDid we build the code right? Does it work as specified?

Test Matrix Why? UnitDid we build the code right? Does it work as specified? AcceptanceDid we build the right code? Does it do what the user wants?

Test Matrix Why? UnitDid we build the code right? Does it work as specified? AcceptanceDid we build the right code? Does it do what the user wants? IntegrationDo system components work together? What about performance?

Test Matrix Why? UnitDid we build the code right? Does it work as specified? AcceptanceDid we build the right code? Does it do what the user wants? IntegrationDo system components work together? What about performance? SystemIs the system installed and configured correctly?

Test Matrix Why? UnitDid we build the code right? Does it work as specified? AcceptanceDid we build the right code? Does it do what the user wants? IntegrationDo system components work together? What about performance? SystemIs the system installed and configured correctly? ExploratoryWhat can we find out about the system that is not specified by these tests?

Test Matrix Coverage % Auto ? ToolsDevelopers’ Role Unit Acceptance Integration System Exploratory

Test Matrix Sources: Robert C. Martin, Rob Diana Coverage % Auto ? ToolsDevelopers’ Role UnitYes  NUnit/JUnit and similar tools  isolation (mocking) frameworks AcceptanceYes  acceptance testing frameworks (Cucumber, FitNesse, Robot etc.)  domain-specific languages (DSLs) IntegrationYesUI testing frameworks (e.g. Selenium) SystemYessame ExploratoryNo-

Test Matrix Sources: Robert C. Martin, Rob Diana Coverage % Auto ? ToolsDevelopers’ Role Unit90%Yes  NUnit/JUnit and similar tools  isolation (mocking) frameworks Acceptance50%Yes  acceptance testing frameworks (Cucumber, FitNesse, Robot etc.)  domain-specific languages (DSLs) Integration20%YesUI testing frameworks (e.g. Selenium) System5%Yessame Exploratory-No-

Test Matrix Sources: Robert C. Martin, Rob Diana Coverage % Auto ? ToolsDevelopers’ Role Unit90%Yes  NUnit/JUnit and similar tools  isolation (mocking) frameworks take personal responsibility Acceptance50%Yes  acceptance testing frameworks (Cucumber, FitNesse, Robot etc.)  domain-specific languages (DSLs) collaborate Integration20%YesUI testing frameworks (e.g. Selenium) System5%Yessame Exploratory-No--

A Very Short Introduction to Acceptance Testing

Consider This Test Script A new customer registers The customer places three books in the shopping cart The customer goes to check-out The customer fills in their delivery address (province: Ontario) The system offers free delivery to the customer Source: Gojko Adzic. Bridging the Communication Gap, pp

Compare the Test Script to This The system offers free delivery to Ontario customers when they place their first order and their order contains at least three books

Convert to the Tabular Form number of booksorder numbership tofree delivery? 31OntarioYes

number of booksorder numbership tofree delivery? 31OntarioYes 21OntarioNo

number of booksorder numbership tofree delivery? 31OntarioYes 21OntarioNo 32OntarioNo

number of booksorder numbership tofree delivery? 31OntarioYes 21OntarioNo 32OntarioNo 31AlbertaNo

How To Do It Collaborate: –developers –business analysts –testers –product owner Which tool to use is not as important Don’t look up terminology in Wikipedia

Books

Unit-Testing When System Under Test (SUT) Has Dependencies Break the dependencies

What If We Don’t? Configuration Database data Remote services Permissions Time to run Infrequent errors Dependencies in development

Can You Run Unit Tests Like This?

Code Example NotificationService StudentRepositoryCaller GradingEngine

Code Example Mock StubUnit Test System Under Test

(Open IDE)

Source September 2010http://

Two Camps Design for Testability: Moq, RhinoMocks, etc. Dynamically fake objects implementing interfaces/base classes in their own way Require software under test to be designed to be testable Programmers to follow SOLID principles (esp. Dependency Inversion Principle) Mock Anything, e.g. Typemock Isolator, JustMock Rely on Profiler API Can intercept anything and run something else instead Can fake statics, sealed classes, etc. Don’t force design for testability

Popular Frameworks (Java) “Conventional”: –Mockito –EasyMock –JMock Alternative: –JMockit

Roy Osherove The Chief Architect at TypeMock Wrote: “A customer switches to Moq – and I’m happy” And: “This is pure awesome. This is why I come to work every day.” How is it possible? Read it: customer-switches-to-moq-and-im-happy.html customer-switches-to-moq-and-im-happy.html

Back to Our Code Example Grading engine operates on Student and Grade But Student has a Department And Grade has a Course and Course has a Semester We start mocking Soon, we have a lot of mocks

“Every time a mock returns another mock a fairy dies” Who said it? Not the guy whose tweet comes up first in Google search results I am not 100% sure What the heck does it mean anyway?

“Every time a mock returns another mock a fairy dies” Who said it? Not the guy whose tweet comes up first in Google search results I am not 100% sure What the heck does it mean anyway? We don’t have time for it in this presentation

Creating Objects Constructor injection (as in our code example) Factory What if dependencies have dependencies? What if dependencies of dependencies have dependencies?

Pretty Soon, Things Begin To Look Like This Source: (different box color = different life span) (and this is a simple example)

These Tools Can Help StructureMap Castle Windsor Unity NInject autofac

Conclusions

Quality: More Important Than This

More Conclusions You have to test No single testing strategy is nearly enough Employ multiple strategies Each of them is difficult to master We barely scratched the surface today Agile brings testing into focus Combine hard and soft skills Collaborate

Q&A