Testing Steve Loughran HP Laboratories June 9th, 2008
About me I break things for a living this is because I am clumsy breaking other people’s code is fun sometimes it is really hard
Ant in Action the problems of complex builds in big teams not for this course stay in  the  IDE testing is key to getting big projects out the door automation comes next
your code doesn't work
I know this because...
my code doesn't work
it's OK to write code that doesn’t work
but not to ship it
especially when it matters
how do you get from "broken" to "shipping"?
Device Drivers ship and see test it! Test-Driven  x:    y : f ( y , x) > 0 Formal Methods prove it works
proofs of correctness shows an algorithm really works good for concurrency and other things you can’t test makes assumptions about system needs lots of maths/CS skills (Pi-Calculus, The HOL System) how do you do regression proofs?
Testing: code that breaks unit test: test classes, libraries functional test: test the application system test: test a deployed system performance test: simulate load. acceptance tests: is it ready for use? a good test breaks the build!
Test Driven Development any feature without a test  doesn’t exist
Lots of unit test frameworks Java: JUnit, TestNG Python: PyUnit Ruby: Test:: Unit   .NET: NUnit PHP: PHPUnit C++ (CppUnit)
JUnit main unit test framework in Java  (see also TestNG) simple to learn good tool support somewhat low-level extensions for system testing
 
public class LessSimpleTest extends TestCase { public  LessSimpleTest (String s) { super(s); } public void testAssignment() { final Date date = new Date(); Event event = new Event(UUID.randomUUID(),  date, "now", "Text"); assertEquals("self equality failed",  event, event); assertEquals(date, event.getDate()); assertNotNull(date.getID()); } }
swing GUI TestRunner
Ant-generated report scales better; reports published
Continuous Integration see: CruiseControl, Hudson, LuntBuild
==> blame assignment whose change broke the build?
System Testing deploy, then: HtmlUnit, XmlUnit, Cactus, Selenium needs automated deployment, database setup, teardown performance testing by comparing timings w.r.t. old runs simulate entire behaviour of the client user/application
Distributed Systems testing is still a research topic set up complex configurations run tests on remote machines collect results and log data post-mortem analysis virtualization can help see  http://tinyurl.com/y99tez
limitations of testing good tests are hard to write distributed tests very hard different system configurations are still a problem status of "tester" below "coder" A good test breaks the application
politics: resistance to change
developers: ignorance, fear E.E.E. Educate, Evangelise, Encourage gently show benefits use testing to track down a bug retain test for regression testing add tests for new code and old problems, not existing codebase adopt cruise control, reporting
management: ignorance "too much time spent on testing" out of date with modern processes belief that testing slows the schedule (it does on the ship-and-see process) E.E.E., then D.D.D:  Distract, Dissemble, Defeat
call to action write tests use a CI tool: Hudson,  Luntbuild, Cruise Control

More Related Content

PDF
Sample Chapter of Practical Unit Testing with TestNG and Mockito
PDF
2013 DevFest Vienna - Bad Tests, Good Tests
PPT
PDF
Testing in FrontEnd World by Nikita Galkin
PPTX
Performance testing locust
PDF
Confitura 2012 Bad Tests, Good Tests
PDF
GeeCON 2012 Bad Tests, Good Tests
PDF
War of the Machines: PVS-Studio vs. TensorFlow
Sample Chapter of Practical Unit Testing with TestNG and Mockito
2013 DevFest Vienna - Bad Tests, Good Tests
Testing in FrontEnd World by Nikita Galkin
Performance testing locust
Confitura 2012 Bad Tests, Good Tests
GeeCON 2012 Bad Tests, Good Tests
War of the Machines: PVS-Studio vs. TensorFlow

What's hot (20)

PDF
prohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracle
PPTX
Selenium with java
PPTX
Selenium TestNG
PPTX
JavaScript Metaprogramming with ES 2015 Proxy
PPTX
QA Fest 2019. Олексій Остапов. Тестування навантаження за 5 хв. Порівняння до...
PPT
Testing And Drupal
PDF
Understanding JavaScript Testing
PDF
Developer Tests - Things to Know (Vilnius JUG)
PPT
Automated Unit Testing
PPS
Why Unit Testingl
PDF
Developer Test - Things to Know
PPT
Simple Unit Testing With Netbeans 6.1
PDF
Unit testing for WordPress
PDF
Selenium with testng and eclipse ide
PDF
JUnit & Mockito, first steps
PPTX
Building unit tests correctly
PDF
Manage Selenium Grid with Terraform by Omkar Khatavkar (https://www.linkedin....
PDF
Introduzione allo Unit Testing
PPSX
prohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracle
Selenium with java
Selenium TestNG
JavaScript Metaprogramming with ES 2015 Proxy
QA Fest 2019. Олексій Остапов. Тестування навантаження за 5 хв. Порівняння до...
Testing And Drupal
Understanding JavaScript Testing
Developer Tests - Things to Know (Vilnius JUG)
Automated Unit Testing
Why Unit Testingl
Developer Test - Things to Know
Simple Unit Testing With Netbeans 6.1
Unit testing for WordPress
Selenium with testng and eclipse ide
JUnit & Mockito, first steps
Building unit tests correctly
Manage Selenium Grid with Terraform by Omkar Khatavkar (https://www.linkedin....
Introduzione allo Unit Testing
Ad

Viewers also liked (20)

PPTX
SVA Workshop 100111
PPT
Mismatched: What's Wrong With the Way We Recognize Patterns
PPTX
Help! My Hadoop doesn't work!
PPTX
HA Hadoop -ApacheCon talk
PPT
Deploying On EC2
PPT
Beyond Unit Testing
PPT
When Web Services Go Bad
PDF
Benchmarking
PDF
Hadoop & Hep
PPT
The Wondrous Curse of Interoperability
PPTX
Hadoop: today and tomorrow
PPT
My other computer is a datacentre - 2012 edition
PDF
Hadoop Futures
PPTX
New Roles In The Cloud
ODP
Farming hadoop in_the_cloud
PPTX
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
PPT
Application Architecture For The Cloud
PPTX
Apache Spark and Object Stores
PPTX
Spark Summit East 2017: Apache spark and object stores
PPTX
Household INFOSEC in a Post-Sony Era
SVA Workshop 100111
Mismatched: What's Wrong With the Way We Recognize Patterns
Help! My Hadoop doesn't work!
HA Hadoop -ApacheCon talk
Deploying On EC2
Beyond Unit Testing
When Web Services Go Bad
Benchmarking
Hadoop & Hep
The Wondrous Curse of Interoperability
Hadoop: today and tomorrow
My other computer is a datacentre - 2012 edition
Hadoop Futures
New Roles In The Cloud
Farming hadoop in_the_cloud
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
Application Architecture For The Cloud
Apache Spark and Object Stores
Spark Summit East 2017: Apache spark and object stores
Household INFOSEC in a Post-Sony Era
Ad

Similar to Testing (20)

PPTX
Testing 101
PDF
Introduction to-automated-testing
PDF
Introduction to Automated Testing
ODP
Testing In Java
ODP
Testing In Java4278
PDF
Test and Behaviour Driven Development (TDD/BDD)
PDF
Unit testing and scaffolding
PPTX
The Test way
PDF
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
PPT
Automated testing overview
PPTX
Unit testing & TDD concepts with best practice guidelines.
PDF
Agile Java Testing With Open Source Frameworks
PPTX
Test Driven Development
PPTX
Testing Sap: Modern Methodology
PPTX
presentation des google test dans un contexte de tdd
PDF
Just Java2007 - Daniel Wildt - Tools For Java Test Automation
PPTX
Unit Testing and TDD 2017
PPTX
Unit Tests And Automated Testing
PPT
AutoTest.ppt
PDF
Unit testing - An introduction
Testing 101
Introduction to-automated-testing
Introduction to Automated Testing
Testing In Java
Testing In Java4278
Test and Behaviour Driven Development (TDD/BDD)
Unit testing and scaffolding
The Test way
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Automated testing overview
Unit testing & TDD concepts with best practice guidelines.
Agile Java Testing With Open Source Frameworks
Test Driven Development
Testing Sap: Modern Methodology
presentation des google test dans un contexte de tdd
Just Java2007 - Daniel Wildt - Tools For Java Test Automation
Unit Testing and TDD 2017
Unit Tests And Automated Testing
AutoTest.ppt
Unit testing - An introduction

More from Steve Loughran (20)

PPTX
Hadoop Vectored IO
PPTX
The age of rename() is over
PPTX
What does Rename Do: (detailed version)
PPTX
Put is the new rename: San Jose Summit Edition
PPTX
@Dissidentbot: dissent will be automated!
PPTX
PUT is the new rename()
PPT
Extreme Programming Deployed
PPTX
I hate mocking
PPTX
What does rename() do?
PPTX
Dancing Elephants: Working with Object Storage in Apache Spark and Hive
PPTX
Apache Spark and Object Stores —for London Spark User Group
PPTX
Hadoop, Hive, Spark and Object Stores
PPTX
Hadoop and Kerberos: the Madness Beyond the Gate
PPTX
Slider: Applications on YARN
PPTX
YARN Services
PPTX
Datacentre stack
PPTX
Overview of slider project
ODP
2014 01-02-patching-workflow
PPTX
2013 11-19-hoya-status
PPTX
Hoya for Code Review
Hadoop Vectored IO
The age of rename() is over
What does Rename Do: (detailed version)
Put is the new rename: San Jose Summit Edition
@Dissidentbot: dissent will be automated!
PUT is the new rename()
Extreme Programming Deployed
I hate mocking
What does rename() do?
Dancing Elephants: Working with Object Storage in Apache Spark and Hive
Apache Spark and Object Stores —for London Spark User Group
Hadoop, Hive, Spark and Object Stores
Hadoop and Kerberos: the Madness Beyond the Gate
Slider: Applications on YARN
YARN Services
Datacentre stack
Overview of slider project
2014 01-02-patching-workflow
2013 11-19-hoya-status
Hoya for Code Review

Recently uploaded (20)

PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
UiPath Agentic Automation session 1: RPA to Agents
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
CloudStack 4.21: First Look Webinar slides
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
DOCX
search engine optimization ppt fir known well about this
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPT
What is a Computer? Input Devices /output devices
PPTX
Configure Apache Mutual Authentication
PPTX
Modernising the Digital Integration Hub
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Taming the Chaos: How to Turn Unstructured Data into Decisions
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
Module 1.ppt Iot fundamentals and Architecture
UiPath Agentic Automation session 1: RPA to Agents
Final SEM Unit 1 for mit wpu at pune .pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Zenith AI: Advanced Artificial Intelligence
CloudStack 4.21: First Look Webinar slides
sustainability-14-14877-v2.pddhzftheheeeee
Convolutional neural network based encoder-decoder for efficient real-time ob...
search engine optimization ppt fir known well about this
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
A contest of sentiment analysis: k-nearest neighbor versus neural network
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
What is a Computer? Input Devices /output devices
Configure Apache Mutual Authentication
Modernising the Digital Integration Hub
A comparative study of natural language inference in Swahili using monolingua...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...

Testing

  • 1. Testing Steve Loughran HP Laboratories June 9th, 2008
  • 2. About me I break things for a living this is because I am clumsy breaking other people’s code is fun sometimes it is really hard
  • 3. Ant in Action the problems of complex builds in big teams not for this course stay in the IDE testing is key to getting big projects out the door automation comes next
  • 5. I know this because...
  • 7. it's OK to write code that doesn’t work
  • 8. but not to ship it
  • 10. how do you get from "broken" to "shipping"?
  • 11. Device Drivers ship and see test it! Test-Driven  x:  y : f ( y , x) > 0 Formal Methods prove it works
  • 12. proofs of correctness shows an algorithm really works good for concurrency and other things you can’t test makes assumptions about system needs lots of maths/CS skills (Pi-Calculus, The HOL System) how do you do regression proofs?
  • 13. Testing: code that breaks unit test: test classes, libraries functional test: test the application system test: test a deployed system performance test: simulate load. acceptance tests: is it ready for use? a good test breaks the build!
  • 14. Test Driven Development any feature without a test doesn’t exist
  • 15. Lots of unit test frameworks Java: JUnit, TestNG Python: PyUnit Ruby: Test:: Unit .NET: NUnit PHP: PHPUnit C++ (CppUnit)
  • 16. JUnit main unit test framework in Java (see also TestNG) simple to learn good tool support somewhat low-level extensions for system testing
  • 17.  
  • 18. public class LessSimpleTest extends TestCase { public LessSimpleTest (String s) { super(s); } public void testAssignment() { final Date date = new Date(); Event event = new Event(UUID.randomUUID(), date, "now", "Text"); assertEquals("self equality failed", event, event); assertEquals(date, event.getDate()); assertNotNull(date.getID()); } }
  • 20. Ant-generated report scales better; reports published
  • 21. Continuous Integration see: CruiseControl, Hudson, LuntBuild
  • 22. ==> blame assignment whose change broke the build?
  • 23. System Testing deploy, then: HtmlUnit, XmlUnit, Cactus, Selenium needs automated deployment, database setup, teardown performance testing by comparing timings w.r.t. old runs simulate entire behaviour of the client user/application
  • 24. Distributed Systems testing is still a research topic set up complex configurations run tests on remote machines collect results and log data post-mortem analysis virtualization can help see http://tinyurl.com/y99tez
  • 25. limitations of testing good tests are hard to write distributed tests very hard different system configurations are still a problem status of "tester" below "coder" A good test breaks the application
  • 27. developers: ignorance, fear E.E.E. Educate, Evangelise, Encourage gently show benefits use testing to track down a bug retain test for regression testing add tests for new code and old problems, not existing codebase adopt cruise control, reporting
  • 28. management: ignorance "too much time spent on testing" out of date with modern processes belief that testing slows the schedule (it does on the ship-and-see process) E.E.E., then D.D.D: Distract, Dissemble, Defeat
  • 29. call to action write tests use a CI tool: Hudson, Luntbuild, Cruise Control