SlideShare a Scribd company logo
1 of 57
First Steps in Testing Analytics: 
Does Test Code Quality Matter? 
Andy Zaidman 
Delft University of Technology 
Nederlandse Testdag 
17 november 2014, Amersfoort
Joint work with Moritz Beller & Georgios Gousios 
(TU Delft) 
Dimitrios Athanasiou, Ariadi 
Nugroho & Joost Visser 
(Software Improvement Group)
Who am I? 
Software engineering 
teacher by day 
Testing 
evangelist 
Software engineering 
researcher by night
What would you like to know? 
What analytics? 
• ???
WHAT EVER HAP P ENS…
@azaidman
TODAY 
2 test analytics stories
STORY 1 
Test Code Quality 
Matters
Andy teaching 
First year programming course @ TU Delft 
 In week 3 everyone is unit testing 
“I don’t have time for testing” 
“I don’t like testing, my code is good 
anyway” 
“How much should I test?” 
“How good should my test code be?”
@Test 
public void testConstructor() { 
assertTrue(true) 
} 
Solution 1
Solution 2 
@Test 
public void testConstructor() { 
House h = new House(“Street”, “9”); 
assertEquals(“Street 9”, h.toString()); 
}
Solution 3 
@Test 
public void testConstructor() { 
House h = new House(“Street”, “9”); 
assertEquals(“Street”, h.getStreet()); 
assertEquals(9, h.getNumber()); 
}
Solution 4 
@Test 
public void testConstructorStreet() { 
House h = new House(“Street”, “9”); 
assertEquals(“Street”, h.getStreet()); 
} 
@Test 
public void testConstructorNumber() { 
House h = new House(“Street”, “9”); 
assertEquals(9, h.getNumber()); 
}
My first reaction?
SHOOT 
FIRST
BRINGS US 
NOWHERE
Analytics?
Testing Analytics!
Thou shalt not 
have less than 
70% coverage
What makes a 
good 
unit test? 
What makes a 
good 
integration test?
What makes a 
good 
developer test?
What makes a 
good 
developer test? 
Complete 
Effective 
Maintainable
Complete 
• How much of the code is covered by the tests? 
• How many of the decision points in the code are 
tested? 
Code coverage 
#assertions/cyclomatic complexity
Effective 
• How able is the test code to detect defects? 
• How able is the test code to locate the cause? 
Assertion density #assertions / LOCtest 
Directness unit versus integration testing
Maintainable 
• How maintainable is the system’s test code? 
Software Improvement Group quality model
Test Code Quality Model* 
Complete 
+ Effective 
+ Maintainable 
* Calibrated using 86 systems
SO 
WHAT?
Better 
tests 
Easier 
development 
?
Observation 1* 
High quality tests do not lead to quicker/easier 
bug fixing 
Why? 
The low-hanging fruit is already solved if you 
have good tests… the difficult bugs remain 
* While studying 75 years of combined development of 18 software systems
High quality tests do lead to higher productivity 
• More issues fixed per month per developer 
• More issues fixed per month per KLOC 
Why? 
Implementing new features does seem to 
benefit from having a safety net for existing 
functionality. 
Observation 2
High quality tests do make your team 
more productive!
Action(able)
#assertions 
McCabe cyclomatic complexity 
≥ 1 
The single most 
important thing for test 
code quality
…
STORY 2 
Testing takes 50% of 
your time
Says this guy 
• Study from 1975 
• Questionable research 
approach
Differences? 
• Waterfall 
• Developer testing 
• Programming language 
• Tools (e.g. IDE)
New research
+ +
Recording 
1. Time spent on developing production code 
2. Time spent on developing test code 
3. How frequently are Junit tests executed? 
4. How frequently do these test runs fail?
124 developers participating
You might win
http://testroots.org/testroots_watchdog.html
…
My ultimate dream? 
Continuous 
background 
testing
Take home 
• Test code quality matters for the productivity 
of your team 
• #assertions/cyclomatic complexity ≥ 1 
• Help us out with our research! 
a.e.zaidman@tudelft.nl 
http://azaidman.wordpress.com 
httpp://www.st.ewi.tudelft.nl/~zaidman 
@azaidman

More Related Content

What's hot

Adopting Agile
Adopting AgileAdopting Agile
Adopting AgileCoverity
 
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)Igor Bronovskyy
 
Pertanyaan dan jawaban (graham et.al 2011) part 1
Pertanyaan dan jawaban (graham et.al 2011) part 1Pertanyaan dan jawaban (graham et.al 2011) part 1
Pertanyaan dan jawaban (graham et.al 2011) part 1ikhwana luthfi
 
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010Atlassian
 
David Hayman - Say What? Testing a Voice Avtivated System - EuroSTAR 2010
David Hayman - Say What? Testing a Voice Avtivated System - EuroSTAR 2010David Hayman - Say What? Testing a Voice Avtivated System - EuroSTAR 2010
David Hayman - Say What? Testing a Voice Avtivated System - EuroSTAR 2010TEST Huddle
 
Psychology and Engineering of Testing
Psychology and Engineering of TestingPsychology and Engineering of Testing
Psychology and Engineering of TestingIlari Henrik Aegerter
 
How to get the most out of code reviews
How to get the most out of code reviewsHow to get the most out of code reviews
How to get the most out of code reviewsJavaDayUA
 
FutureOfTesting2008
FutureOfTesting2008FutureOfTesting2008
FutureOfTesting2008vipulkocher
 
Santa Barbara Agile: Exploratory Testing Explained and Experienced
Santa Barbara Agile: Exploratory Testing Explained and ExperiencedSanta Barbara Agile: Exploratory Testing Explained and Experienced
Santa Barbara Agile: Exploratory Testing Explained and ExperiencedMaaret Pyhäjärvi
 
Ian Agustiawan - Tech Days
Ian Agustiawan - Tech DaysIan Agustiawan - Tech Days
Ian Agustiawan - Tech DaysIan Agustiawan
 
How (Much) Do Developers Test?
How (Much) Do Developers Test?How (Much) Do Developers Test?
How (Much) Do Developers Test?Moritz Beller
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingCameron Presley
 
How (Much) Do Developers Test?
How (Much) Do Developers Test?How (Much) Do Developers Test?
How (Much) Do Developers Test?Moritz Beller
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestShawn Jones
 
Testing strategies for legacy code
Testing strategies for legacy codeTesting strategies for legacy code
Testing strategies for legacy codeAlex Soto
 

What's hot (20)

Adopting Agile
Adopting AgileAdopting Agile
Adopting Agile
 
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
 
Pertanyaan dan jawaban (graham et.al 2011) part 1
Pertanyaan dan jawaban (graham et.al 2011) part 1Pertanyaan dan jawaban (graham et.al 2011) part 1
Pertanyaan dan jawaban (graham et.al 2011) part 1
 
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
 
David Hayman - Say What? Testing a Voice Avtivated System - EuroSTAR 2010
David Hayman - Say What? Testing a Voice Avtivated System - EuroSTAR 2010David Hayman - Say What? Testing a Voice Avtivated System - EuroSTAR 2010
David Hayman - Say What? Testing a Voice Avtivated System - EuroSTAR 2010
 
Bad metric, bad!
Bad metric, bad!Bad metric, bad!
Bad metric, bad!
 
Psychology and Engineering of Testing
Psychology and Engineering of TestingPsychology and Engineering of Testing
Psychology and Engineering of Testing
 
How to get the most out of code reviews
How to get the most out of code reviewsHow to get the most out of code reviews
How to get the most out of code reviews
 
[Paul Holland] Trends in Software Testing
[Paul Holland] Trends in Software Testing[Paul Holland] Trends in Software Testing
[Paul Holland] Trends in Software Testing
 
Testing for everyone
Testing for everyoneTesting for everyone
Testing for everyone
 
FutureOfTesting2008
FutureOfTesting2008FutureOfTesting2008
FutureOfTesting2008
 
Santa Barbara Agile: Exploratory Testing Explained and Experienced
Santa Barbara Agile: Exploratory Testing Explained and ExperiencedSanta Barbara Agile: Exploratory Testing Explained and Experienced
Santa Barbara Agile: Exploratory Testing Explained and Experienced
 
Ian Agustiawan - Tech Days
Ian Agustiawan - Tech DaysIan Agustiawan - Tech Days
Ian Agustiawan - Tech Days
 
Best pratice
Best praticeBest pratice
Best pratice
 
How (Much) Do Developers Test?
How (Much) Do Developers Test?How (Much) Do Developers Test?
How (Much) Do Developers Test?
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To Testing
 
How (Much) Do Developers Test?
How (Much) Do Developers Test?How (Much) Do Developers Test?
How (Much) Do Developers Test?
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonest
 
A Taste of Exploratory Testing
A Taste of Exploratory TestingA Taste of Exploratory Testing
A Taste of Exploratory Testing
 
Testing strategies for legacy code
Testing strategies for legacy codeTesting strategies for legacy code
Testing strategies for legacy code
 

Viewers also liked

Data Analytics Project Plan
Data Analytics Project PlanData Analytics Project Plan
Data Analytics Project PlanJelilat Adesiyan
 
Designing Resource-Aware Applications for the Cloud with ABS
Designing Resource-Aware Applications for the Cloud with ABSDesigning Resource-Aware Applications for the Cloud with ABS
Designing Resource-Aware Applications for the Cloud with ABSEinar Broch Johnsen
 
Web API Fragility: How Robust Is Your Mobile Application?
Web API Fragility: How Robust Is Your Mobile Application?Web API Fragility: How Robust Is Your Mobile Application?
Web API Fragility: How Robust Is Your Mobile Application?Andy Zaidman
 
Studying Late Propagations in Code Clone Evolution Using Software Repository ...
Studying Late Propagations in Code Clone Evolution Using Software Repository ...Studying Late Propagations in Code Clone Evolution Using Software Repository ...
Studying Late Propagations in Code Clone Evolution Using Software Repository ...Andy Zaidman
 
Divide and-conquer approach towards data analytics testing
Divide and-conquer approach towards data analytics testingDivide and-conquer approach towards data analytics testing
Divide and-conquer approach towards data analytics testingKokilaRudresh
 
Data Analytics-testing spectrum
Data Analytics-testing spectrumData Analytics-testing spectrum
Data Analytics-testing spectrumVodqaBLR
 
Mind maps tutorial Agile Testing Days
Mind maps tutorial Agile Testing DaysMind maps tutorial Agile Testing Days
Mind maps tutorial Agile Testing DaysHuib Schoots
 
10 Revealing Statistics About Compensation & Benefits You should Know
10 Revealing Statistics About Compensation & Benefits You should Know10 Revealing Statistics About Compensation & Benefits You should Know
10 Revealing Statistics About Compensation & Benefits You should KnowElodie A.
 

Viewers also liked (9)

Data Analytics Project Plan
Data Analytics Project PlanData Analytics Project Plan
Data Analytics Project Plan
 
Designing Resource-Aware Applications for the Cloud with ABS
Designing Resource-Aware Applications for the Cloud with ABSDesigning Resource-Aware Applications for the Cloud with ABS
Designing Resource-Aware Applications for the Cloud with ABS
 
Web API Fragility: How Robust Is Your Mobile Application?
Web API Fragility: How Robust Is Your Mobile Application?Web API Fragility: How Robust Is Your Mobile Application?
Web API Fragility: How Robust Is Your Mobile Application?
 
Studying Late Propagations in Code Clone Evolution Using Software Repository ...
Studying Late Propagations in Code Clone Evolution Using Software Repository ...Studying Late Propagations in Code Clone Evolution Using Software Repository ...
Studying Late Propagations in Code Clone Evolution Using Software Repository ...
 
Divide and-conquer approach towards data analytics testing
Divide and-conquer approach towards data analytics testingDivide and-conquer approach towards data analytics testing
Divide and-conquer approach towards data analytics testing
 
Data Analytics-testing spectrum
Data Analytics-testing spectrumData Analytics-testing spectrum
Data Analytics-testing spectrum
 
Mind maps tutorial Agile Testing Days
Mind maps tutorial Agile Testing DaysMind maps tutorial Agile Testing Days
Mind maps tutorial Agile Testing Days
 
ATAGTR2017 Analytics Testing
ATAGTR2017 Analytics TestingATAGTR2017 Analytics Testing
ATAGTR2017 Analytics Testing
 
10 Revealing Statistics About Compensation & Benefits You should Know
10 Revealing Statistics About Compensation & Benefits You should Know10 Revealing Statistics About Compensation & Benefits You should Know
10 Revealing Statistics About Compensation & Benefits You should Know
 

Similar to First steps in testing analytics: Does test code quality matter?

Can we induce change with what we measure?
Can we induce change with what we measure?Can we induce change with what we measure?
Can we induce change with what we measure?Michaela Greiler
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...TEST Huddle
 
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTransferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTao Xie
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and AutomationMahesh Salaria
 
What is Unit Testing
What is Unit TestingWhat is Unit Testing
What is Unit TestingSadaaki Emura
 
How to Clean Up Your Continuous Testing Suites for Web & Mobile
How to Clean Up Your Continuous Testing Suites for Web & MobileHow to Clean Up Your Continuous Testing Suites for Web & Mobile
How to Clean Up Your Continuous Testing Suites for Web & MobilePerfecto by Perforce
 
Test-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate WorkplaceTest-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate WorkplaceAhmed Owian
 
Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023Scott Keck-Warren
 
Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023Scott Keck-Warren
 
Automated Unit Testing and TDD
Automated Unit Testing and TDDAutomated Unit Testing and TDD
Automated Unit Testing and TDDGreg Sohl
 
Software Arch TDD ppt.pdf
Software Arch TDD ppt.pdfSoftware Arch TDD ppt.pdf
Software Arch TDD ppt.pdfTed M. Young
 
How to Guarantee Continuous Value from your Test Automation
How to Guarantee Continuous Value from your Test AutomationHow to Guarantee Continuous Value from your Test Automation
How to Guarantee Continuous Value from your Test AutomationPerfecto by Perforce
 
Automatic for the People
Automatic for the PeopleAutomatic for the People
Automatic for the PeopleAndy Zaidman
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)Thierry Gayet
 
Google test training
Google test trainingGoogle test training
Google test trainingThierry Gayet
 
Every code coverage tool is measuring the wrong thing (on purpose)
Every code coverage tool is measuring the wrong thing (on purpose)Every code coverage tool is measuring the wrong thing (on purpose)
Every code coverage tool is measuring the wrong thing (on purpose)Sean Reilly
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In ActionJon Kruger
 

Similar to First steps in testing analytics: Does test code quality matter? (20)

Can we induce change with what we measure?
Can we induce change with what we measure?Can we induce change with what we measure?
Can we induce change with what we measure?
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
 
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTransferring Software Testing Tools to Practice
Transferring Software Testing Tools to Practice
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
TDD Best Practices
TDD Best PracticesTDD Best Practices
TDD Best Practices
 
What is Unit Testing
What is Unit TestingWhat is Unit Testing
What is Unit Testing
 
How to Clean Up Your Continuous Testing Suites for Web & Mobile
How to Clean Up Your Continuous Testing Suites for Web & MobileHow to Clean Up Your Continuous Testing Suites for Web & Mobile
How to Clean Up Your Continuous Testing Suites for Web & Mobile
 
Test-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate WorkplaceTest-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate Workplace
 
Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023
 
Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023
 
Automated Unit Testing and TDD
Automated Unit Testing and TDDAutomated Unit Testing and TDD
Automated Unit Testing and TDD
 
Software Arch TDD ppt.pdf
Software Arch TDD ppt.pdfSoftware Arch TDD ppt.pdf
Software Arch TDD ppt.pdf
 
How to Guarantee Continuous Value from your Test Automation
How to Guarantee Continuous Value from your Test AutomationHow to Guarantee Continuous Value from your Test Automation
How to Guarantee Continuous Value from your Test Automation
 
Agile testing
Agile testingAgile testing
Agile testing
 
Automatic for the People
Automatic for the PeopleAutomatic for the People
Automatic for the People
 
TDD talk
TDD talkTDD talk
TDD talk
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
 
Google test training
Google test trainingGoogle test training
Google test training
 
Every code coverage tool is measuring the wrong thing (on purpose)
Every code coverage tool is measuring the wrong thing (on purpose)Every code coverage tool is measuring the wrong thing (on purpose)
Every code coverage tool is measuring the wrong thing (on purpose)
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 

Recently uploaded

GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY1301aanya
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptxryanrooker
 
Introduction of DNA analysis in Forensic's .pptx
Introduction of DNA analysis in Forensic's .pptxIntroduction of DNA analysis in Forensic's .pptx
Introduction of DNA analysis in Forensic's .pptxrohankumarsinghrore1
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceAlex Henderson
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsOrtegaSyrineMay
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Silpa
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...Scintica Instrumentation
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Serviceshivanisharma5244
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxMohamedFarag457087
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxSuji236384
 
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...Monika Rani
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .Poonam Aher Patil
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and ClassificationsAreesha Ahmad
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusNazaninKarimi6
 
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flypumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flyPRADYUMMAURYA1
 
Velocity and Acceleration PowerPoint.ppt
Velocity and Acceleration PowerPoint.pptVelocity and Acceleration PowerPoint.ppt
Velocity and Acceleration PowerPoint.pptRakeshMohan42
 
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIACURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIADr. TATHAGAT KHOBRAGADE
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfSumit Kumar yadav
 

Recently uploaded (20)

GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx
 
Introduction of DNA analysis in Forensic's .pptx
Introduction of DNA analysis in Forensic's .pptxIntroduction of DNA analysis in Forensic's .pptx
Introduction of DNA analysis in Forensic's .pptx
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical Science
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICEPATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
 
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flypumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
 
Velocity and Acceleration PowerPoint.ppt
Velocity and Acceleration PowerPoint.pptVelocity and Acceleration PowerPoint.ppt
Velocity and Acceleration PowerPoint.ppt
 
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIACURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 

First steps in testing analytics: Does test code quality matter?

  • 1. First Steps in Testing Analytics: Does Test Code Quality Matter? Andy Zaidman Delft University of Technology Nederlandse Testdag 17 november 2014, Amersfoort
  • 2. Joint work with Moritz Beller & Georgios Gousios (TU Delft) Dimitrios Athanasiou, Ariadi Nugroho & Joost Visser (Software Improvement Group)
  • 3. Who am I? Software engineering teacher by day Testing evangelist Software engineering researcher by night
  • 4. What would you like to know? What analytics? • ???
  • 5.
  • 6. WHAT EVER HAP P ENS…
  • 8. TODAY 2 test analytics stories
  • 9. STORY 1 Test Code Quality Matters
  • 10. Andy teaching First year programming course @ TU Delft  In week 3 everyone is unit testing “I don’t have time for testing” “I don’t like testing, my code is good anyway” “How much should I test?” “How good should my test code be?”
  • 11. @Test public void testConstructor() { assertTrue(true) } Solution 1
  • 12.
  • 13. Solution 2 @Test public void testConstructor() { House h = new House(“Street”, “9”); assertEquals(“Street 9”, h.toString()); }
  • 14. Solution 3 @Test public void testConstructor() { House h = new House(“Street”, “9”); assertEquals(“Street”, h.getStreet()); assertEquals(9, h.getNumber()); }
  • 15. Solution 4 @Test public void testConstructorStreet() { House h = new House(“Street”, “9”); assertEquals(“Street”, h.getStreet()); } @Test public void testConstructorNumber() { House h = new House(“Street”, “9”); assertEquals(9, h.getNumber()); }
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Thou shalt not have less than 70% coverage
  • 26.
  • 27. What makes a good unit test? What makes a good integration test?
  • 28. What makes a good developer test?
  • 29. What makes a good developer test? Complete Effective Maintainable
  • 30. Complete • How much of the code is covered by the tests? • How many of the decision points in the code are tested? Code coverage #assertions/cyclomatic complexity
  • 31. Effective • How able is the test code to detect defects? • How able is the test code to locate the cause? Assertion density #assertions / LOCtest Directness unit versus integration testing
  • 32. Maintainable • How maintainable is the system’s test code? Software Improvement Group quality model
  • 33. Test Code Quality Model* Complete + Effective + Maintainable * Calibrated using 86 systems
  • 35.
  • 36. Better tests Easier development ?
  • 37. Observation 1* High quality tests do not lead to quicker/easier bug fixing Why? The low-hanging fruit is already solved if you have good tests… the difficult bugs remain * While studying 75 years of combined development of 18 software systems
  • 38. High quality tests do lead to higher productivity • More issues fixed per month per developer • More issues fixed per month per KLOC Why? Implementing new features does seem to benefit from having a safety net for existing functionality. Observation 2
  • 39. High quality tests do make your team more productive!
  • 41. #assertions McCabe cyclomatic complexity ≥ 1 The single most important thing for test code quality
  • 42.
  • 43. STORY 2 Testing takes 50% of your time
  • 44. Says this guy • Study from 1975 • Questionable research approach
  • 45. Differences? • Waterfall • Developer testing • Programming language • Tools (e.g. IDE)
  • 47.
  • 48. + +
  • 49. Recording 1. Time spent on developing production code 2. Time spent on developing test code 3. How frequently are Junit tests executed? 4. How frequently do these test runs fail?
  • 51.
  • 54.
  • 55. My ultimate dream? Continuous background testing
  • 56.
  • 57. Take home • Test code quality matters for the productivity of your team • #assertions/cyclomatic complexity ≥ 1 • Help us out with our research! a.e.zaidman@tudelft.nl http://azaidman.wordpress.com httpp://www.st.ewi.tudelft.nl/~zaidman @azaidman