1 00:00:08,280 --> 00:00:12,745 Welcome back. Writing automated test cases 2 00:00:12,745 --> 00:00:16,750 is a bit of an advanced topic for an intro programming course like this one. 3 00:00:16,750 --> 00:00:19,360 We've included it because it's a preview of 4 00:00:19,360 --> 00:00:22,900 an essential software engineering practice for larger projects. 5 00:00:22,900 --> 00:00:26,470 It's a good idea to start developing the habit of testing, 6 00:00:26,470 --> 00:00:29,705 right from the beginning of your programming career. 7 00:00:29,705 --> 00:00:31,885 Moreover, the idea of 8 00:00:31,885 --> 00:00:36,805 edge cases is an important way to think about what your program needs to do. 9 00:00:36,805 --> 00:00:40,210 Indeed more generally, you may find that the notion of edge cases 10 00:00:40,210 --> 00:00:45,035 influences how you think about processes is beyond the ROM of computer programming. 11 00:00:45,035 --> 00:00:50,770 For example, when I think about grading policies for my on-campus courses, 12 00:00:50,770 --> 00:00:53,050 I like to think about edge cases. 13 00:00:53,050 --> 00:00:55,750 What if a student gets sick the night before 14 00:00:55,750 --> 00:00:59,200 the assignment is due and then hands it in late. 15 00:00:59,200 --> 00:01:02,469 What if the students skipped some of the required assignments, 16 00:01:02,469 --> 00:01:07,570 but then demonstrates mastery of the material by getting a 100 percent on the exam. 17 00:01:07,570 --> 00:01:11,060 Those are edge cases that I need to have policies about. 18 00:01:11,060 --> 00:01:14,415 I need to decide what is the correct grades to assign to students, 19 00:01:14,415 --> 00:01:18,050 when those unusual circumstances occur. 20 00:01:18,240 --> 00:01:23,365 Learning to express your test cases as invocations of test.text equal, 21 00:01:23,365 --> 00:01:26,110 is also a good way to reinforce your understanding, 22 00:01:26,110 --> 00:01:29,725 the mechanics of functions, and of classes. 23 00:01:29,725 --> 00:01:32,750 At this point, you should be able to 24 00:01:32,750 --> 00:01:36,510 use the test.text equal function to express test cases, 25 00:01:36,510 --> 00:01:39,560 identify when a return value test is needed, 26 00:01:39,560 --> 00:01:42,040 versus one-side effect tests is needed. 27 00:01:42,040 --> 00:01:44,480 You should be able to identify and express 28 00:01:44,480 --> 00:01:48,275 edge cases for functions and pre-class definitions. 29 00:01:48,275 --> 00:01:51,350 Testing, testing, one, two, three, 30 00:01:51,350 --> 00:01:54,530 testing is the mic working? Are we on camera? 31 00:01:54,530 --> 00:01:58,145 Hi, everyone? That was just a little joke about testing. 32 00:01:58,145 --> 00:02:00,230 That's all in testing for now. 33 00:02:00,230 --> 00:02:03,060 By everyone, see you next time.