Testing III
Preparation
Watch the following videos:
- Formal Methods of Software Design: Introduction (12 minutes)
- What is SPARK? (2 minutes)
Learning Objectives
- Formulate test cases from requirements
- Calculate cyclomatic complexity and create test cases for each basis path
- Use static analysis tools to identify faults in programs
- Decide if an issue reported by a static analysis tool is a false positive
Resources
Complete the handouts on testing and static analysis as time permits in (or outside of) class
Hovemeyer and Pugh, “Finding Bugs is Easy,” Proceedings of the 19th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA ‘04), pp. 132–136, October 2004 (slides)
Further Reading
Bessey, Block, Chelf, Chou, Fulton, Hallem, Henri-Gros, Kamsky, McPeak, and Engler, “A Few Billion Lines of Code Later: Using Static Analysis to Find Bugs in the Real World,” Communications of the ACM, Vol. 53, No. 2, pp. 66–75, February 2010 (online)
Sadowski, Aftandilian, Eagle, Miller-Cushon, and Jaspan, “Lessons from Building Static Analysis Tools at Google, Communications of the ACM, Vol. 61, No. 4, pp. 58–66, April 2018 (online)
Distefano, Fähndrich, Logozzo, and O’Hearn, “Scaling Static Analyses at Facebook,” Communications of the ACM, Vol. 62, No. 8, pp. 62–70, August 2019 (online)
Static Analysis
SpotBugs (Java)
Infer (Java or C / C++ / Objective-C)
Flake8 (Python)