110 likes | 243 Views
Darko Marinov January 26, 2012. cs498dm Software Testing. Administrative Info. Mailing list confirmed last time Any questions about the course overview? Schedule (order set but dates are tentative) Syllabus Project: testing Java PathFinder Textbook recommended
E N D
Darko Marinov January 26, 2012 cs498dmSoftware Testing
Administrative Info • Mailing list confirmed last time • Any questions about the course overview? • Schedule (order set but dates are tentative) • Syllabus • Project: testing Java PathFinder • Textbook recommended • “Introduction to Software Testing”by Paul Ammann and Jeff Offutt
Previous Lectures • Introduction to “Bugs” • Why look for bugs? What are bugs? • Where they come from? How to detect them? • Example ambiguous informal statement: “everybody likes a winner”; meaning? • some w: Winner | some p: Person | p.likes(w) • some w: Winner | all p: Person | p.likes(w) • all p: Person | some w: Winner | p.likes(w) • all p: Person | all w: Winner | p.likes(w)
Next Week • I'll be out of town (but then here for weeks) • Two lectures to be used for lab on pset1 • Problem set 1 will be released this week • Due in two weeks but make steady progress • Where to do the lab exercises? • Classroom (1103), bring laptops • Basement lab (0220), use desktops
Problem Set 1 • Will go out this week • Four problems on Chapter 1 and Junit • Two problems on JPF • Total of 120 points, but you need only 100 for maximum score • Grading will be strict! • Prioritize your work
Today’s Lecture: Example Interactive Testing Session • Test some small program • TriTyp: Given three integers for the lengths of the sides of a triangle, find the type of triangle • Several reasons to do this together • We will learn some testing terminology • It should be fun to look for some bugs • We can learn from mistakes as we go • I prefer working with hands on examples
Testing Levels Based on Software Activity • Unit testing • (Module testing) • Integration testing • System testing • (Acceptance testing) • Regression testing • Names are not standardized • I don’t insist on names; we will follow the book
Test Cases • Test case values (inputs) • Expected results (if known) • Prefix values • Postfix values • Verification values • Exit commands • Test set/suite: a set of test cases
Some Other Terminology • Black-box testing • White-box testing (or glass-box, clear-box) • Top-down testing • Bottom-up testing • Static testing • Dynamic testing
Coverage Criteria • Did we have any test plan or purpose? • Did we specify any test requirements? • How good are our tests? • Did we generate enough tests? • Criterion: rule that imposes test requirements • Coverage: satisfaction of test requirements
Automated Testing • We want to test (early and often) • Automated testing • Regression testing • Can use JUnit (or a similar tool) • Alternatives have some cons • Different language for scripting • A lot of printing if no checking of result • Using “main” does not compose well