CSC 216 Lecture Notes - Lecture 3: Static Analysis, Cyclomatic Complexity, Findbugs

36 views4 pages
25 Aug 2016
School
Course
Professor

Document Summary

A test case should be written for each method, if possible. All statements in a method have been covered. In this case, each statement has to be tested. All conditional tests have been evaluated to true and false at least once. All parts of a compound conditional test have been evaluated to true. Benefits of code coverage: a measure of how complete your test cases are. High coverage =/= correctness: can identify paths through the code that you may have missed. Then work from your control flow diagram and basis path testing. Limitation of code coverage: the assumption that you"re done testing if you have high coverage is incorrect. Coverage tools only tell you if you"ve covered what"s there. There may be requirements that you have missed: don"t write test cases only to make your coverage tool happy. Inspect surrounding code for other potential errors, perhaps requirements you"ve missed.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents