INFO1110 Lecture Notes - Lecture 2: White-Box Testing, Regression Testing, Order Of Merit
Document Summary
Lomoarcpsd|7290020 try: pass except filenotfounderror: pass except oserror: pass except exception: # catch all exceptions pass. Testing is about comparing actual output with expected output. Without testing, you cannot be sure that your code works as you intend it to. We need to make sure the output and the values our program produces match with what we expect it to. These questions can also help inform how you write tests. Testing helps identify problems in your code so you can make the steps to x the problems. There are different ways to test a program: tracing code. Desk checks, for example: black box testing. Cannot see code no reference to how the programs works. Quick and powerful: white box testing. Can see code looks inside the function. Can choose values to test different execution paths: testing by printing: Print after most (if not every) step. Tells us which path has been executed.