CS246-F20-02-TestingOverview
2. A few thoughts on testing
CS246 Fall 2020
Prof. Mike Godfrey
University of Waterloo
Lecture 2.1
• Testing as part of software development:
– The waterfall model
– Agile software development
CS246
Old school “waterfall” development
Requirements
engineering
Design and
implementation
Testing
• “Big design up front”
• Get it right the first time, then throw it over the wall
Modern agile / iterative development
Requirements
engineering
Design and
implementation
Testing• Multiple mini-cycles of 2-3 weeks
– Each mini-cycle produces a shippable product
• Incremental design, customer feedback
– Get good at change!
Modern agile / iterative development
https://bikeshsrivastava.blogspot.com/2017/01/part-43what-is-agile-methodology.html
Modern agile / iterative development
[See http://en.wikipedia.org/wiki/Unified_Process ]
Testing is central to agile development
• All agile approaches put testing at the core of development
– Tests effectively define what “correctness” means for the system
– Tests are designed along with (or even ahead of) the code
• Test-driven development is commonly part of most “agile
development” processes
– Develop test cases that satisfy the reqs before you write the code
– Then write the simplest code that satisfies the tests
– Keep the test cases up to date! The tests evolve as your code does!
… but you can’t test everything
• … so you need to be strategic and systematic
– Throwing random data at the system is not testing
• Testing is expensive (but failure is more so)
– So we want the tests to be effective, get bang for the buck
• Need to evaluate effectiveness of test suites
– Don’t test the same thing twice
– Devise equivalence classes of test cases
– Testing needs to be systematic, planned, evaluated, evolved
– What is the ROI on test suites (cost to run vs. value of results)?
Over-engineering and the Rule of 3
https://xkcd.com/974/
End
CS246