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

37 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+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents