COMPSCI 1MD3 Lecture Notes - Lecture 12: Code Coverage, Empty String, Unit Testing

80 views2 pages

Document Summary

Testing - determines if a program works as intended. Do(cid:374) t rely o(cid:374) k(cid:374)owi(cid:374)g the progra(cid:373)"s sour(cid:272)e (cid:272)ode, o(cid:374)ly o(cid:374) the a(cid:271)ility to put a(cid:374) i(cid:374)put i(cid:374) a(cid:374)d see the corresponding output. This method focuses on developing test cases to see if the actual output matches the expected output for a given input. Both require a clear specification of the program"s expected behaviour. The program is broken into parts that are reasonably self-contained and achieve a clear purpose and can be reused. A component of a program can be used without knowing how it works. Modularity enables test cases to be developed for each individual module. Integration testing is the testing of the program as a whole. When a bug is fixed, and then later more source code changes are made that introduce the same/similar bug. When fixing a bug, develop two test cases: One that should fail if the bug is present.

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