Top Banner
Software Testing #IRL [email protected]
33

Software Testing #IRL [email protected]. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Dec 16, 2015

Download

Documents

Meghan Greene
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Software Testing #[email protected]

Page 2: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Agenda

• Why Software Testing• Software Testing Principles

– Exhaustive testing is impossible– Early Testing– Testing shows the Presence of Bugs– Defect Clustering– The Pesticide Paradox– Testing is Context Dependent – Absence of errors fallacy

• Summary• Recommended reading

Page 3: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.
Page 4: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Other professions in Computer Science

Project Lead Developer Architect

Technical Writer Customer IT Ops

Page 5: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

How Other professions in Computer Science sees test

Project Lead Developer Architect

Technical Writer Customer IT Ops

Page 6: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.
Page 7: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Agenda

• Why Software Testing• Software Testing Principles

– Exhaustive testing is impossible– Early Testing– Testing shows the Presence of Bugs– Defect Clustering– The Pesticide Paradox– Testing is Context Dependent – Absence of errors fallacy

• Summary• Recommended reading

Page 8: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Exhaustive Testing is Impossible

Page 9: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

What you Think you are Testing

Page 10: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Developer Forgot «this.»

Page 11: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Off by One

Page 12: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Type Casting

Page 13: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Previous Values

Page 14: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Date and Time

Page 15: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Obey Thermodynamics – it’s also a LAW!

• 1 year of power of sun is enough energy to flip bits to count to all combinations in a 187 bit number.

• 187 bit < 24 byte.

Google: “schneier dog crypteto”http://www.schneier.com/blog/archives/2009/09/the_doghouse_cr.html

Page 16: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Early Testing: V-Model

Architecture

Requirements

Specification

Design

Code

Acceptance Test

System Test

Integration Test

Unit Test

Page 17: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Early Testing: W-Model

Architecture

Requirements

Specification

Design

Code

Acceptance Test

System Test

Integration Test

Unit Test

Design Acceptance Test

Design System Test

Design Integration Test

Design Unit Test

Page 18: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Cost of Defect

Introduced\Detected Reqs Arch Construction System test Production

Requirements 1X 3X 5-10X 10X 10-100X

Architecture - 1X 10X 15X 25-100X

Construction - - 1X 10X 10-25X

http://www.abeacha.com/NIST_press_release_bugs_cost.htm

Page 19: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Quality Attributes: ISO/IEC 9126-1:2001

• Functionality - satisfies needs.– Suitability– Accuracy– Interoperability– Security– Functionality Compliance

• Reliability - maintains operation– Maturity– Fault Tolerance– Recoverability– Reliability Compliance

• Usability - effort needed for use– Understandability– Learnability– Operability– Attractiveness– Usability Compliance

• Efficiency - performance given resources– Time Behaviour– Resource Utilisation– Efficiency Compliance

• Maintainability - make modifications– Analyzability– Changeability– Stability– Testability– Maintainability Compliance

• Portability - change environment– Adaptability– Installability– Co-Existence– Replaceability– Portability Compliance

Page 20: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Types of Testing

Acceptance Test

System Test

Integration Test

Unit Test

Functional Efficiency Interopability

X

X

X

X

X

X

X

Page 21: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Several Layers

Acceptance Test

System Test

Integration Test

Unit Test

Functional Efficiency Security

X

X

X

X

X

X

X

System Int. Test X

Page 22: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Testing shows the presence of bugs, but can not show that there are no defects

• 1986: Programming Pearls, binarySearch() bevist og testet i et kapittel

• 1997: Implementert i Sun java.util.Arrays.binarySearch()

• 2006: Feil funnet og fikset i Java-biblioteket

http://googleresearch.blogspot.it/2006/06/extra-extra-read-all-about-it-nearly.html

Page 23: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Defect Clustering

http://www.slideshare.net/andreas.zeller/myths-in-software-engineering

Page 24: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Bugs Found with Bug Seeding

http://www.slideshare.net/andreas.zeller/seeding-bugs-to-find-bugs-presentation

Page 25: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Pesticide Paradox

Age oftest

Bugs found per dayby a test

Page 26: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Regression Testing

Acceptance Test

System Test

Integration Test

Unit Test

Functional Efficiency Security

X

X

X

X

X

X

X

System Int. Test X

X

Leve

ls

Types

Page 27: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Testing is Context Dependent

Coverage

Cost

0% 50% 100%

Cost oftesting

80-85%?Cost ofdefects

Page 28: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Absence of Errors does not mean the System is OK

Acceptance Test

System Test

Integration Test

Unit Test95%

Performance/Stability

Page 29: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Agenda

• Why Software Testing• Software Testing Principles

– Exhaustive testing is impossible– Early Testing– Testing shows the Presence of Bugs– Defect Clustering– The Pesticide Paradox– Testing is Context Dependent – Absence of errors fallacy

• Summary• Recommended reading

Page 30: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

TL;DL

• Testing #FTW #YOLO

• You can’t test everything!• Testing is Context Dependent!

• Get involved early!

• Testing doesn’t prove software is without bugs• Absence of errors does not prove the system is ok

• Defects cluster• Old tests find fewer bugs

Page 31: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Books you should read to learn more about…

People and testing Creative Testing Coding

Software Engineering Testing in Trondheim Fun Web

Page 32: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Software Testing #[email protected]

Page 33: Software Testing #IRL jorgen.austvik@kantega.no. Agenda Why Software Testing Software Testing Principles – Exhaustive testing is impossible – Early Testing.

Copyrights

• Ant Hill: RukaKuusamo.com• Money bag: http://www.flickr.com/photos/68751915@N05/ CC AT SA• Book: http://www.flickr.com/photos/pat00139/ CC AT• Cables: http://www.flickr.com/photos/alq666/ CC AT SA• Bokhylle: Sehoon Lee Phote

http://design-milk.com/squaring-movable-bookshelf-by-sehoon-lee/• Hender: CC AT NM NC http://www.flickr.com/photos/johnkay/• Angel: CC AT NC http://www.flickr.com/photos/jens-h-friedrich• Guarantee: CC AT http://www.flickr.com/photos/vectorportal• Road: CC AT SA http://www.flickr.com/photos/huangjiahui/