WEBVTT

1
00:00:02.665 --> 00:00:06.005
<00:00:02.665>And <00:00:02.865>yeah, <00:00:03.065>today <00:00:03.265>we're <00:00:03.465>talking <00:00:03.665>about <00:00:03.865>testing <00:00:04.064>respectively

2
00:00:06.215 --> 00:00:07.925
<00:00:06.215>about <00:00:06.564>how <00:00:06.915>not <00:00:07.265>to <00:00:07.615>test.

3
00:00:07.945 --> 00:00:10.085
<00:00:07.945>So <00:00:08.145>we're <00:00:08.345>going <00:00:08.545>to <00:00:08.745>talk <00:00:08.945>about <00:00:09.145>typical <00:00:09.345>mistakes,

4
00:00:10.355 --> 00:00:14.925
<00:00:10.355>typical <00:00:10.635>misconceptions, <00:00:10.915>typical <00:00:11.195>misleading <00:00:11.475>ideas, <00:00:11.755>um,

5
00:00:14.925 --> 00:00:16.565
<00:00:14.925>because <00:00:15.205>when <00:00:15.485>you <00:00:15.765>talk <00:00:16.045>about <00:00:16.325>testing,

6
00:00:16.565 --> 00:00:20.005
<00:00:16.565>testing <00:00:16.692>is <00:00:16.819>a <00:00:16.946>pretty <00:00:17.074>large <00:00:17.201>topic, <00:00:17.328>and <00:00:17.455>there <00:00:17.583>are <00:00:17.710>so <00:00:17.837>many <00:00:17.965>ideas

7
00:00:20.145 --> 00:00:24.085
<00:00:20.145>and <00:00:20.300>things <00:00:20.456>floating <00:00:20.611>around, <00:00:20.767>um, <00:00:20.922>that, <00:00:21.078>uh, <00:00:21.233>yeah, <00:00:21.389>that, <00:00:21.544>uh,

8
00:00:24.115 --> 00:00:28.565
<00:00:24.115>naturally <00:00:24.290>there <00:00:24.465>are <00:00:24.639>some <00:00:24.814>more, <00:00:24.990>uh, <00:00:25.165>yeah, <00:00:25.340>better <00:00:25.514>ideas

9
00:00:28.825 --> 00:00:30.845
<00:00:28.825>and, <00:00:29.105>uh, <00:00:29.384>some <00:00:29.665>rather <00:00:29.945>worse <00:00:30.224>ideas.

10
00:00:31.425 --> 00:00:34.605
<00:00:31.425>And <00:00:31.552>so <00:00:31.679>we're <00:00:31.806>going <00:00:31.934>to <00:00:32.061>have <00:00:32.188>a <00:00:32.315>look <00:00:32.443>at <00:00:32.570>these <00:00:32.697>things <00:00:32.825>today.

11
00:00:35.355 --> 00:00:37.165
<00:00:35.355>When <00:00:35.705>I, <00:00:36.055>uh, <00:00:36.404>started <00:00:36.754>programming,

12
00:00:37.425 --> 00:00:40.725
<00:00:37.425>and, <00:00:37.580>uh, <00:00:37.736>this <00:00:37.891>is <00:00:38.047>already <00:00:38.202>quite <00:00:38.358>a <00:00:38.513>while <00:00:38.669>ago, <00:00:38.824>um,

13
00:00:41.245 --> 00:00:42.605
<00:00:41.245>I <00:00:41.489>was <00:00:41.734>12 <00:00:41.979>years <00:00:42.224>back <00:00:42.468>then.

14
00:00:42.715 --> 00:00:44.165
<00:00:42.715>This <00:00:43.150>was, <00:00:43.585>uh, <00:00:44.019>1990.

15
00:00:44.865 --> 00:00:47.685
<00:00:44.865>And, <00:00:45.020>uh, <00:00:45.176>when <00:00:45.331>I <00:00:45.487>started <00:00:45.642>programming, <00:00:45.798>it <00:00:45.953>was <00:00:46.109>with, <00:00:46.265>uh,

16
00:00:48.145 --> 00:00:49.485
<00:00:48.145>GW <00:00:48.547>Basic <00:00:48.949>on <00:00:49.351>Ms.

17
00:00:49.585 --> 00:00:52.005
<00:00:49.585>Dos. <00:00:49.760>And, <00:00:49.935>uh, <00:00:50.110>the <00:00:50.285>first <00:00:50.460>lines <00:00:50.635>of <00:00:50.810>code, <00:00:50.985>uh,

18
00:00:52.005 --> 00:00:55.605
<00:00:52.005>that <00:00:52.205>I <00:00:52.405>have <00:00:52.605>written <00:00:52.805>were, <00:00:53.005>uh, <00:00:53.205>basically <00:00:53.405>guided

19
00:00:55.745 --> 00:00:56.765
<00:00:55.745>by <00:00:56.204>my <00:00:56.663>granddad.

20
00:00:56.825 --> 00:00:59.205
<00:00:56.825>And <00:00:57.058>he, <00:00:57.291>uh, <00:00:57.525>explained <00:00:57.758>what <00:00:57.991>input <00:00:58.225>is,

21
00:00:59.235 --> 00:01:00.965
<00:00:59.235>what <00:00:59.515>print <00:00:59.795>is, <00:01:00.075>what <00:01:00.355>variable <00:01:00.635>is.

22
00:01:01.265 --> 00:01:03.045
<00:01:01.265>And <00:01:01.498>I <00:01:01.731>remember <00:01:01.965>that <00:01:02.198>as <00:01:02.431>a <00:01:02.665>12-year-old,

23
00:01:03.045 --> 00:01:05.565
<00:01:03.045>it <00:01:03.200>was <00:01:03.356>a <00:01:03.511>little <00:01:03.667>bit <00:01:03.822>difficult <00:01:03.978>for <00:01:04.133>me <00:01:04.289>to <00:01:04.445>understand,

24
00:01:05.625 --> 00:01:07.205
<00:01:05.625>and <00:01:05.825>that <00:01:06.025>it, <00:01:06.225>it <00:01:06.425>took <00:01:06.625>me <00:01:06.825>some <00:01:07.025>time.

25
00:01:07.665 --> 00:01:09.245
<00:01:07.665>But <00:01:07.898>I <00:01:08.131>had, <00:01:08.365>I <00:01:08.598>was <00:01:08.831>very <00:01:09.065>lucky

26
00:01:09.245 --> 00:01:11.405
<00:01:09.245>because <00:01:09.478>my <00:01:09.711>father <00:01:09.945>sat <00:01:10.178>down <00:01:10.411>with <00:01:10.645>me.

27
00:01:11.425 --> 00:01:12.645
<00:01:11.425>He, <00:01:11.699>he <00:01:11.973>couldn't <00:01:12.248>program <00:01:12.523>either.

28
00:01:13.225 --> 00:01:17.925
<00:01:13.225>Um, <00:01:13.365>but <00:01:13.505>together, <00:01:13.645>he <00:01:13.785>and <00:01:13.925>I, <00:01:14.065>we, <00:01:14.205>um, <00:01:14.345>got <00:01:14.485>some <00:01:14.625>books

29
00:01:18.025 --> 00:01:20.045
<00:01:18.025>and <00:01:18.258>we <00:01:18.491>started <00:01:18.725>to <00:01:18.958>learn <00:01:19.191>basic <00:01:19.425>together.

30
00:01:20.465 --> 00:01:21.965
<00:01:20.465>And, <00:01:20.802>uh, <00:01:21.140>basically <00:01:21.477>back <00:01:21.815>then,

31
00:01:21.995 --> 00:01:23.245
<00:01:21.995>this <00:01:22.182>is <00:01:22.370>why <00:01:22.557>I'm <00:01:22.745>telling <00:01:22.932>you <00:01:23.120>this,

32
00:01:23.245 --> 00:01:25.645
<00:01:23.245>because <00:01:23.445>this <00:01:23.645>is <00:01:23.845>the <00:01:24.045>beginning <00:01:24.245>of <00:01:24.445>my <00:01:24.645>story,

33
00:01:25.665 --> 00:01:28.725
<00:01:25.664>and <00:01:25.781>this <00:01:25.898>will <00:01:26.014>also <00:01:26.131>be, <00:01:26.248>uh, <00:01:26.365>later <00:01:26.481>on <00:01:26.598>the <00:01:26.714>end <00:01:26.831>of <00:01:26.948>my <00:01:27.065>story.

34
00:01:29.105 --> 00:01:32.005
<00:01:29.105>In <00:01:29.260>the <00:01:29.416>beginning <00:01:29.571>when <00:01:29.727>I <00:01:29.882>was <00:01:30.038>a <00:01:30.193>child, <00:01:30.349>um, <00:01:30.505>I,

35
00:01:32.085 --> 00:01:35.445
<00:01:32.085>I <00:01:32.240>didn't <00:01:32.396>even <00:01:32.551>know <00:01:32.707>that <00:01:32.862>something <00:01:33.018>such <00:01:33.173>as <00:01:33.329>testing <00:01:33.485>in,

36
00:01:35.445 --> 00:01:38.125
<00:01:35.445>in <00:01:35.600>the, <00:01:35.756>in, <00:01:35.911>in, <00:01:36.067>in <00:01:36.222>the <00:01:36.378>meaning <00:01:36.533>of <00:01:36.689>automated <00:01:36.845>testing

37
00:01:38.555 --> 00:01:40.285
<00:01:38.555>that <00:01:38.835>this <00:01:39.115>even <00:01:39.395>exists <00:01:39.675>for <00:01:39.955>me,

38
00:01:40.285 --> 00:01:42.245
<00:01:40.285>testing <00:01:40.634>was <00:01:40.985>running <00:01:41.335>the <00:01:41.685>program.

39
00:01:42.505 --> 00:01:44.645
<00:01:42.505>So <00:01:42.705>whenever <00:01:42.905>I've <00:01:43.104>written <00:01:43.304>some <00:01:43.505>lines <00:01:43.705>of <00:01:43.905>code,

40
00:01:44.915 --> 00:01:47.685
<00:01:44.914>what <00:01:45.115>I've <00:01:45.315>done <00:01:45.514>is, <00:01:45.714>uh, <00:01:45.914>I <00:01:46.115>executed <00:01:46.315>things

41
00:01:47.825 --> 00:01:50.765
<00:01:47.825>and, <00:01:47.965>uh, <00:01:48.105>it, <00:01:48.245>it <00:01:48.385>was <00:01:48.525>actually <00:01:48.665>like, <00:01:48.805>uh, <00:01:48.945>typing <00:01:49.085>two <00:01:49.225>lines

42
00:01:50.765 --> 00:01:53.485
<00:01:50.765>of <00:01:50.965>print <00:01:51.165>and <00:01:51.365>then <00:01:51.565>re-cutting <00:01:51.765>the <00:01:51.965>entire <00:01:52.165>thing

43
00:01:53.485 --> 00:01:55.525
<00:01:53.485>to <00:01:53.660>see <00:01:53.835>whether <00:01:54.010>it <00:01:54.185>actually <00:01:54.360>prints <00:01:54.535>on <00:01:54.710>the <00:01:54.885>screen.

44
00:01:55.985 --> 00:01:58.765
<00:01:55.985>And <00:01:56.185>it <00:01:56.385>was <00:01:56.585>far <00:01:56.785>from <00:01:56.985>my, <00:01:57.185>uh, <00:01:57.385>imagination.

45
00:01:58.765 --> 00:02:02.325
<00:01:58.765>It <00:01:58.920>was <00:01:59.076>far <00:01:59.231>from <00:01:59.387>my, <00:01:59.542>uh, <00:01:59.698>understanding <00:01:59.853>of <00:02:00.009>programming, <00:02:00.165>uh,

46
00:02:02.425 --> 00:02:06.805
<00:02:02.425>to, <00:02:02.580>to <00:02:02.736>ever <00:02:02.891>think <00:02:03.047>of, <00:02:03.202>uh, <00:02:03.358>like <00:02:03.513>typing <00:02:03.669>100 <00:02:03.825>lines

47
00:02:06.805 --> 00:02:10.285
<00:02:06.805>of <00:02:06.980>code <00:02:07.155>without <00:02:07.330>executing <00:02:07.505>them <00:02:07.680>every <00:02:07.855>few <00:02:08.030>seconds <00:02:08.205>to,

48
00:02:10.385 --> 00:02:12.045
<00:02:10.384>to <00:02:10.664>actually <00:02:10.945>see <00:02:11.225>whether <00:02:11.505>it <00:02:11.785>works.

49
00:02:12.665 --> 00:02:15.205
<00:02:12.665>And, <00:02:12.820>um, <00:02:12.976>yeah, <00:02:13.131>since <00:02:13.287>I <00:02:13.442>didn't <00:02:13.598>know <00:02:13.753>that <00:02:13.909>something <00:02:14.065>such

50
00:02:15.205 --> 00:02:19.165
<00:02:15.205>as <00:02:15.405>testing <00:02:15.605>actually <00:02:15.805>exists, <00:02:16.005>I <00:02:16.205>didn't <00:02:16.405>miss <00:02:16.605>anything.

51
00:02:19.425 --> 00:02:23.805
<00:02:19.425>So <00:02:19.532>I, <00:02:19.640>I, <00:02:19.748>uh, <00:02:19.855>as <00:02:19.963>a, <00:02:20.071>as <00:02:20.178>a, <00:02:20.286>um, <00:02:20.394>as <00:02:20.501>a <00:02:20.609>child, <00:02:20.717>as <00:02:20.825>a,

52
00:02:24.205 --> 00:02:26.525
<00:02:24.204>a <00:02:24.404>young <00:02:24.605>adult, <00:02:24.804>I, <00:02:25.005>I <00:02:25.204>was <00:02:25.404>writing <00:02:25.605>code

53
00:02:26.545 --> 00:02:27.885
<00:02:26.545>and <00:02:26.947>I <00:02:27.349>didn't, <00:02:27.751>uh,

54
00:02:27.895 --> 00:02:30.565
<00:02:27.895>spend <00:02:28.128>a <00:02:28.361>single <00:02:28.595>second <00:02:28.828>thinking <00:02:29.061>about <00:02:29.295>testing.

55
00:02:30.745 --> 00:02:33.845
<00:02:30.745>And <00:02:30.945>as <00:02:31.145>I <00:02:31.345>said, <00:02:31.545>my <00:02:31.745>granddad <00:02:31.945>introduced <00:02:32.145>me

56
00:02:33.845 --> 00:02:35.165
<00:02:33.845>to <00:02:34.439>programming <00:02:35.033>originally,

57
00:02:35.705 --> 00:02:38.605
<00:02:35.704>and <00:02:35.904>this <00:02:36.105>is <00:02:36.304>in <00:02:36.505>so <00:02:36.704>far, <00:02:36.904>um, <00:02:37.105>noticeable

58
00:02:39.105 --> 00:02:43.965
<00:02:39.105>or <00:02:39.232>notable, <00:02:39.359>um, <00:02:39.486>as <00:02:39.614>he <00:02:39.741>ran, <00:02:39.868>uh, <00:02:39.995>a <00:02:40.123>shop <00:02:40.250>for <00:02:40.377>sports <00:02:40.505>items.

59
00:02:44.385 --> 00:02:48.645
<00:02:44.385>And, <00:02:44.540>um, <00:02:44.696>he <00:02:44.851>had <00:02:45.007>written <00:02:45.162>the <00:02:45.318>entire, <00:02:45.473>um, <00:02:45.629>managing <00:02:45.785>system

60
00:02:48.825 --> 00:02:51.445
<00:02:48.825>for <00:02:49.024>this <00:02:49.225>shop, <00:02:49.424>uh, <00:02:49.625>by <00:02:49.825>himself <00:02:50.024>in <00:02:50.225>basic.

61
00:02:51.705 --> 00:02:55.325
<00:02:51.704>And, <00:02:51.844>uh, <00:02:51.984>I, <00:02:52.124>I <00:02:52.265>assume, <00:02:52.404>unfortunately <00:02:52.545>I <00:02:52.684>can't <00:02:52.825>ask <00:02:52.964>him <00:02:53.105>anymore,

62
00:02:55.705 --> 00:03:00.085
<00:02:55.704>but <00:02:55.832>I <00:02:55.959>assume <00:02:56.086>that <00:02:56.214>he <00:02:56.341>too <00:02:56.468>has <00:02:56.595>never <00:02:56.723>written <00:02:56.850>a <00:02:56.977>single <00:02:57.105>line

63
00:03:00.385 --> 00:03:02.685
<00:03:00.385>of <00:03:00.618>code, <00:03:00.851>uh, <00:03:01.084>with <00:03:01.318>respect <00:03:01.551>to <00:03:01.785>testing.

64
00:03:02.905 --> 00:03:04.605
<00:03:02.905>So, <00:03:03.185>and <00:03:03.465>it <00:03:03.745>somehow <00:03:04.025>it <00:03:04.305>worked.

65
00:03:05.305 --> 00:03:09.245
<00:03:05.305>And <00:03:05.460>so <00:03:05.616>to <00:03:05.771>cut <00:03:05.927>it <00:03:06.082>short <00:03:06.238>testing <00:03:06.393>was <00:03:06.549>basically <00:03:06.705>executing

66
00:03:09.245 --> 00:03:10.765
<00:03:09.245>programs <00:03:09.518>and <00:03:09.792>see <00:03:10.065>whether <00:03:10.339>they <00:03:10.613>did

67
00:03:10.765 --> 00:03:12.005
<00:03:10.765>what <00:03:10.988>you <00:03:11.211>expect <00:03:11.434>them <00:03:11.657>to <00:03:11.881>do.

68
00:03:12.585 --> 00:03:14.965
<00:03:12.585>Um, <00:03:12.740>of <00:03:12.896>course, <00:03:13.051>this <00:03:13.207>is <00:03:13.362>a <00:03:13.518>way <00:03:13.673>to <00:03:13.829>test <00:03:13.985>of,

69
00:03:15.145 --> 00:03:17.725
<00:03:15.145>but <00:03:15.345>also, <00:03:15.545>of <00:03:15.745>course, <00:03:15.945>it's <00:03:16.145>not <00:03:16.345>very <00:03:16.545>efficient.

70
00:03:18.185 --> 00:03:19.925
<00:03:18.185>Um, <00:03:18.465>and <00:03:18.745>it's, <00:03:19.025>it's <00:03:19.305>very <00:03:19.585>cumbersome

71
00:03:19.925 --> 00:03:21.365
<00:03:19.925>and <00:03:20.184>error <00:03:20.443>prone <00:03:20.702>and <00:03:20.961>so <00:03:21.221>on.

72
00:03:22.035 --> 00:03:25.445
<00:03:22.035>Then <00:03:22.162>a <00:03:22.289>few <00:03:22.416>years <00:03:22.544>later, <00:03:22.671>when <00:03:22.798>I <00:03:22.925>got <00:03:23.053>to <00:03:23.180>university, <00:03:23.307>of <00:03:23.435>course,

73
00:03:25.545 --> 00:03:28.725
<00:03:25.545>the <00:03:25.700>programs <00:03:25.856>you, <00:03:26.011>uh, <00:03:26.167>have <00:03:26.322>been <00:03:26.478>writing <00:03:26.633>got <00:03:26.789>more <00:03:26.945>complex.

74
00:03:29.265 --> 00:03:32.445
<00:03:29.265>Um, <00:03:29.440>the <00:03:29.614>university <00:03:29.790>where <00:03:29.964>I <00:03:30.140>have <00:03:30.315>studied <00:03:30.489>computer <00:03:30.665>science,

75
00:03:32.745 --> 00:03:37.045
<00:03:32.745>put <00:03:32.900>a <00:03:33.056>lot <00:03:33.211>of <00:03:33.367>focus <00:03:33.522>on, <00:03:33.678>uh, <00:03:33.833>software <00:03:33.989>engineering, <00:03:34.145>uh,

76
00:03:37.045 --> 00:03:38.765
<00:03:37.045>to <00:03:37.395>be <00:03:37.745>an <00:03:38.095>engineering <00:03:38.445>discipline

77
00:03:39.025 --> 00:03:41.965
<00:03:39.025>and <00:03:39.165>things <00:03:39.305>like <00:03:39.445>that, <00:03:39.585>to <00:03:39.725>be, <00:03:39.865>uh, <00:03:40.005>very <00:03:40.145>systematic <00:03:40.285>in <00:03:40.425>here.

78
00:03:42.035 --> 00:03:43.525
<00:03:42.035>Programming <00:03:42.370>is <00:03:42.705>not <00:03:43.040>an <00:03:43.376>art.

79
00:03:43.715 --> 00:03:45.245
<00:03:43.715>It's <00:03:44.059>an, <00:03:44.403>it's <00:03:44.747>an <00:03:45.092>engineering

80
00:03:45.245 --> 00:03:46.805
<00:03:45.245>science <00:03:45.525>and, <00:03:45.805>and <00:03:46.085>things <00:03:46.365>like <00:03:46.645>that.

81
00:03:47.225 --> 00:03:49.725
<00:03:47.225>Uh, <00:03:47.458>however, <00:03:47.691>still <00:03:47.924>there <00:03:48.158>were <00:03:48.391>no <00:03:48.625>tests.

82
00:03:49.725 --> 00:03:52.885
<00:03:49.725>Nobody <00:03:49.864>ever <00:03:50.005>told <00:03:50.144>me <00:03:50.285>about <00:03:50.424>tests <00:03:50.565>when <00:03:50.704>I <00:03:50.845>was <00:03:50.984>at <00:03:51.125>university.

83
00:03:52.985 --> 00:03:57.875
<00:03:52.985>And <00:03:53.112>today, <00:03:53.239>looking <00:03:53.366>back, <00:03:53.494>I <00:03:53.621>wonder <00:03:53.748>a <00:03:53.875>little <00:03:54.003>bit <00:03:54.130>why <00:03:54.257>it, <00:03:54.385>it,

84
00:03:57.895 --> 00:04:01.835
<00:03:57.895>it <00:03:58.035>feels <00:03:58.175>a <00:03:58.315>little <00:03:58.455>bit <00:03:58.595>strange <00:03:58.735>to, <00:03:58.875>to <00:03:59.015>teach, <00:03:59.155>uh, <00:03:59.295>uh,

85
00:04:01.845 --> 00:04:04.475
<00:04:01.845>young <00:04:02.045>people, <00:04:02.245>uh, <00:04:02.445>how <00:04:02.645>to <00:04:02.845>do <00:04:03.045>computer <00:04:03.245>science,

86
00:04:04.575 --> 00:04:07.635
<00:04:04.575>but <00:04:04.774>don't <00:04:04.975>spend <00:04:05.174>a <00:04:05.375>single <00:04:05.575>word <00:04:05.774>on <00:04:05.975>testing.

87
00:04:08.015 --> 00:04:09.315
<00:04:08.015>And, <00:04:08.405>um, <00:04:08.795>well, <00:04:09.185>yeah.

88
00:04:09.385 --> 00:04:11.315
<00:04:09.385>However, <00:04:09.618>I <00:04:09.851>didn't <00:04:10.084>know <00:04:10.318>that <00:04:10.551>something <00:04:10.785>such

89
00:04:11.315 --> 00:04:15.075
<00:04:11.315>as <00:04:11.454>tests <00:04:11.595>even <00:04:11.734>existed, <00:04:11.875>so <00:04:12.015>I <00:04:12.155>still <00:04:12.295>didn't <00:04:12.435>ask <00:04:12.575>any <00:04:12.715>questions.

90
00:04:15.215 --> 00:04:18.675
<00:04:15.215>And, <00:04:15.355>uh, <00:04:15.495>after <00:04:15.635>university, <00:04:15.775>when <00:04:15.915>I <00:04:16.055>got <00:04:16.195>my <00:04:16.334>first <00:04:16.475>job, <00:04:16.615>um,

91
00:04:19.385 --> 00:04:22.115
<00:04:19.385>yeah, <00:04:19.584>no <00:04:19.784>testing, <00:04:19.985>uh, <00:04:20.185>it, <00:04:20.385>it's, <00:04:20.584>it's <00:04:20.784>not

92
00:04:22.385 --> 00:04:25.875
<00:04:22.385>that <00:04:22.540>they <00:04:22.696>did <00:04:22.851>not <00:04:23.007>only <00:04:23.162>have <00:04:23.318>tests, <00:04:23.473>uh, <00:04:23.629>again, <00:04:23.784>it,

93
00:04:25.875 --> 00:04:27.035
<00:04:25.875>it <00:04:26.083>wasn't <00:04:26.292>a <00:04:26.501>topic <00:04:26.710>at <00:04:26.919>all.

94
00:04:27.035 --> 00:04:28.155
<00:04:27.035>And <00:04:27.203>the <00:04:27.371>same <00:04:27.539>for <00:04:27.707>the <00:04:27.875>second <00:04:28.043>job,

95
00:04:28.155 --> 00:04:30.075
<00:04:28.155>and <00:04:28.388>the <00:04:28.621>same <00:04:28.854>for <00:04:29.088>the <00:04:29.321>third <00:04:29.554>job.

96
00:04:30.095 --> 00:04:32.155
<00:04:30.095>And <00:04:30.328>looking <00:04:30.561>back, <00:04:30.795>this <00:04:31.028>makes <00:04:31.261>me <00:04:31.495>wonder,

97
00:04:32.575 --> 00:04:35.395
<00:04:32.575>or <00:04:32.715>this <00:04:32.854>leads <00:04:32.995>me <00:04:33.135>to <00:04:33.275>a <00:04:33.414>few <00:04:33.555>questions <00:04:33.695>about <00:04:33.835>my <00:04:33.974>jobs.

98
00:04:35.625 --> 00:04:38.275
<00:04:35.625>Well, <00:04:36.091>however, <00:04:36.558>actually <00:04:37.025>sooner

99
00:04:38.335 --> 00:04:40.595
<00:04:38.335>or <00:04:38.534>later, <00:04:38.734>of <00:04:38.935>course, <00:04:39.135>I <00:04:39.335>had <00:04:39.534>some <00:04:39.734>contact

100
00:04:40.745 --> 00:04:42.035
<00:04:40.745>with <00:04:41.035>the <00:04:41.325>idea <00:04:41.615>of <00:04:41.905>testing.

101
00:04:42.135 --> 00:04:45.075
<00:04:42.135>And <00:04:42.335>this <00:04:42.534>was <00:04:42.735>basically <00:04:42.935>driven <00:04:43.135>by <00:04:43.335>the <00:04:43.534>community

102
00:04:45.075 --> 00:04:48.915
<00:04:45.075>because <00:04:45.250>suddenly, <00:04:45.425>um, <00:04:45.599>I <00:04:45.775>think <00:04:45.950>this <00:04:46.125>is <00:04:46.300>around <00:04:46.474>15

103
00:04:49.055 --> 00:04:51.435
<00:04:49.055>to <00:04:49.288>20 <00:04:49.521>years <00:04:49.755>ago, <00:04:49.988>maybe <00:04:50.221>more <00:04:50.455>15,

104
00:04:52.075 --> 00:04:54.515
<00:04:52.075>suddenly <00:04:52.308>there <00:04:52.541>was <00:04:52.775>a <00:04:53.008>hype <00:04:53.241>called <00:04:53.474>TDD

105
00:04:54.585 --> 00:04:55.875
<00:04:54.585>Test <00:04:55.165>Driven <00:04:55.746>Development.

106
00:04:55.975 --> 00:04:57.395
<00:04:55.975>And <00:04:56.401>it <00:04:56.827>felt <00:04:57.253>new.

107
00:04:57.495 --> 00:04:59.955
<00:04:57.495>And <00:04:57.670>I <00:04:57.845>mean, <00:04:58.020>TDD <00:04:58.195>is <00:04:58.370>coming <00:04:58.545>from <00:04:58.720>extreme <00:04:58.895>programming.

108
00:04:59.955 --> 00:05:02.755
<00:04:59.955>Extreme <00:05:00.188>programming <00:05:00.421>came <00:05:00.655>around, <00:05:00.888>uh, <00:05:01.121>at, <00:05:01.354>uh,

109
00:05:02.775 --> 00:05:04.195
<00:05:02.775>2000, <00:05:03.200>something <00:05:03.627>around <00:05:04.053>that.

110
00:05:04.735 --> 00:05:07.635
<00:05:04.735>And, <00:05:04.875>uh, <00:05:05.015>yeah, <00:05:05.155>so <00:05:05.295>of <00:05:05.435>course, <00:05:05.575>uh, <00:05:05.715>I <00:05:05.855>heard <00:05:05.995>of <00:05:06.135>that

111
00:05:07.735 --> 00:05:12.075
<00:05:07.735>and <00:05:07.835>I <00:05:07.935>got <00:05:08.035>a <00:05:08.135>book <00:05:08.235>on <00:05:08.335>it, <00:05:08.435>or <00:05:08.535>I, <00:05:08.635>I've <00:05:08.735>researched <00:05:08.835>the <00:05:08.935>web <00:05:09.035>on <00:05:09.135>it,

112
00:05:12.175 --> 00:05:14.995
<00:05:12.175>and, <00:05:12.291>uh, <00:05:12.408>you <00:05:12.525>can, <00:05:12.641>uh, <00:05:12.758>I, <00:05:12.875>I <00:05:12.991>came <00:05:13.108>up <00:05:13.225>with <00:05:13.341>a <00:05:13.458>few <00:05:13.575>books

113
00:05:15.055 --> 00:05:17.795
<00:05:15.055>or <00:05:15.210>maybe <00:05:15.366>with <00:05:15.521>a <00:05:15.677>tutorial <00:05:15.832>tutorial <00:05:15.988>or <00:05:16.143>something <00:05:16.299>like <00:05:16.455>that,

114
00:05:18.375 --> 00:05:22.435
<00:05:18.375>and <00:05:18.491>I <00:05:18.608>tried, <00:05:18.725>um, <00:05:18.841>to <00:05:18.958>get <00:05:19.075>a <00:05:19.191>foot <00:05:19.308>into <00:05:19.425>this <00:05:19.541>world <00:05:19.658>of <00:05:19.775>testing.

115
00:05:22.575 --> 00:05:25.515
<00:05:22.575>And, <00:05:22.730>um, <00:05:22.886>if <00:05:23.041>you <00:05:23.197>are <00:05:23.352>completely <00:05:23.508>new <00:05:23.663>to <00:05:23.819>that <00:05:23.974>topic,

116
00:05:25.655 --> 00:05:27.675
<00:05:25.655>if <00:05:25.810>you <00:05:25.966>have, <00:05:26.121>don't, <00:05:26.277>if <00:05:26.432>you <00:05:26.588>don't <00:05:26.743>have <00:05:26.899>any <00:05:27.054>idea

117
00:05:27.735 --> 00:05:32.395
<00:05:27.735>how <00:05:27.890>things <00:05:28.046>work, <00:05:28.201>then <00:05:28.357>it's <00:05:28.512>pretty <00:05:28.668>easy <00:05:28.823>to <00:05:28.979>do <00:05:29.135>testing

118
00:05:32.975 --> 00:05:35.915
<00:05:32.975>as <00:05:33.115>long <00:05:33.255>as <00:05:33.395>you <00:05:33.535>follow <00:05:33.675>the <00:05:33.815>hello <00:05:33.955>world <00:05:34.095>examples <00:05:34.235>from <00:05:34.375>the

119
00:05:35.915 --> 00:05:37.435
<00:05:35.915>books <00:05:36.143>and <00:05:36.371>from <00:05:36.599>the <00:05:36.827>how <00:05:37.055>to <00:05:37.283>guides.

120
00:05:37.455 --> 00:05:40.195
<00:05:37.455>Uh, <00:05:37.594>but <00:05:37.734>if <00:05:37.875>you <00:05:38.015>then <00:05:38.155>take <00:05:38.294>a <00:05:38.435>look <00:05:38.575>at <00:05:38.715>your <00:05:38.854>code,

121
00:05:40.695 --> 00:05:42.795
<00:05:40.695>it <00:05:41.161>seems <00:05:41.628>incredibly <00:05:42.094>hard,

122
00:05:43.055 --> 00:05:45.835
<00:05:43.055>and <00:05:43.288>it's <00:05:43.521>so <00:05:43.755>far <00:05:43.988>away <00:05:44.221>from <00:05:44.455>those

123
00:05:46.345 --> 00:05:49.275
<00:05:46.345>neat <00:05:46.545>little <00:05:46.745>small <00:05:46.945>examples, <00:05:47.145>uh, <00:05:47.345>from <00:05:47.545>the <00:05:47.745>book,

124
00:05:49.275 --> 00:05:52.555
<00:05:49.275>which <00:05:49.430>are <00:05:49.586>perfectly <00:05:49.741>suited <00:05:49.897>for <00:05:50.052>testing <00:05:50.208>and <00:05:50.363>your <00:05:50.519>own <00:05:50.674>code.

125
00:05:52.575 --> 00:05:55.395
<00:05:52.575>Oh, <00:05:52.730>this <00:05:52.886>is <00:05:53.041>super <00:05:53.197>hard <00:05:53.352>to <00:05:53.508>write <00:05:53.663>tests <00:05:53.819>for <00:05:53.974>it.

126
00:05:56.135 --> 00:06:00.565
<00:05:56.135>And <00:05:56.262>this <00:05:56.389>led <00:05:56.516>me, <00:05:56.644>and, <00:05:56.771>and <00:05:56.898>this <00:05:57.025>is <00:05:57.153>wrong, <00:05:57.280>uh, <00:05:57.407>looking <00:05:57.534>back,

127
00:06:00.625 --> 00:06:03.845
<00:06:00.625>but <00:06:00.800>this <00:06:00.975>led <00:06:01.150>me <00:06:01.325>to <00:06:01.500>the <00:06:01.675>assumption <00:06:01.850>that, <00:06:02.025>uh,

128
00:06:03.995 --> 00:06:07.045
<00:06:03.995>testing <00:06:04.195>is <00:06:04.395>only <00:06:04.595>possible <00:06:04.795>if <00:06:04.995>code <00:06:05.195>is <00:06:05.395>simple.

129
00:06:07.065 --> 00:06:10.525
<00:06:07.065>If <00:06:07.220>code <00:06:07.376>is <00:06:07.531>easy, <00:06:07.687>if <00:06:07.842>code <00:06:07.998>is <00:06:08.153>basically, <00:06:08.309>um, <00:06:08.465>well,

130
00:06:10.585 --> 00:06:11.765
<00:06:10.585>it, <00:06:10.797>it <00:06:11.009>doesn't <00:06:11.222>do <00:06:11.434>too <00:06:11.647>much.

131
00:06:11.785 --> 00:06:14.365
<00:06:11.785>It <00:06:11.925>doesn't <00:06:12.065>have <00:06:12.205>to <00:06:12.345>contain <00:06:12.485>too <00:06:12.625>much <00:06:12.765>logic <00:06:12.905>and <00:06:13.045>so <00:06:13.185>on.

132
00:06:14.665 --> 00:06:17.765
<00:06:14.665>It, <00:06:14.792>uh, <00:06:14.919>must <00:06:15.046>not <00:06:15.174>be <00:06:15.301>too <00:06:15.428>complex, <00:06:15.555>then <00:06:15.683>it's <00:06:15.810>easy <00:06:15.937>to <00:06:16.065>test.

133
00:06:17.995 --> 00:06:21.525
<00:06:17.995>Looking <00:06:18.135>back, <00:06:18.275>this <00:06:18.415>is <00:06:18.555>the <00:06:18.695>first <00:06:18.835>thing <00:06:18.975>I <00:06:19.115>completely <00:06:19.255>got <00:06:19.395>wrong

134
00:06:21.525 --> 00:06:24.845
<00:06:21.525>about <00:06:21.758>testing, <00:06:21.991>and <00:06:22.224>this <00:06:22.458>is <00:06:22.691>unfortunately <00:06:22.924>something

135
00:06:24.845 --> 00:06:28.765
<00:06:24.845>that <00:06:25.000>still <00:06:25.156>today, <00:06:25.311>I, <00:06:25.467>um, <00:06:25.622>I <00:06:25.778>meet, <00:06:25.933>when <00:06:26.089>I <00:06:26.245>talk

136
00:06:28.765 --> 00:06:31.525
<00:06:28.765>to <00:06:28.940>other <00:06:29.115>developers, <00:06:29.289>when <00:06:29.465>I <00:06:29.640>talk <00:06:29.815>to <00:06:29.990>companies, <00:06:30.164>um,

137
00:06:31.795 --> 00:06:34.085
<00:06:31.795>that <00:06:32.075>I <00:06:32.355>saw <00:06:32.635>often <00:06:32.915>here, <00:06:33.195>well,

138
00:06:34.425 --> 00:06:36.645
<00:06:34.425>we <00:06:34.705>can't <00:06:34.985>test <00:06:35.265>our <00:06:35.545>code <00:06:35.825>appropriately.

139
00:06:37.225 --> 00:06:39.965
<00:06:37.225>Our <00:06:37.425>code <00:06:37.625>is <00:06:37.825>too <00:06:38.025>difficult, <00:06:38.225>it's <00:06:38.425>too <00:06:38.625>complex,

140
00:06:40.025 --> 00:06:41.085
<00:06:40.025>and <00:06:40.263>what <00:06:40.501>we <00:06:40.740>are <00:06:40.979>dealing

141
00:06:41.115 --> 00:06:43.005
<00:06:41.115>with <00:06:41.348>is <00:06:41.581>too <00:06:41.815>complex <00:06:42.048>and <00:06:42.281>too <00:06:42.515>difficult.

142
00:06:43.465 --> 00:06:45.805
<00:06:43.465>And <00:06:43.698>the <00:06:43.931>truth <00:06:44.165>is <00:06:44.398>no, <00:06:44.631>it's <00:06:44.865>not.

143
00:06:46.345 --> 00:06:49.325
<00:06:46.345>The, <00:06:46.485>the <00:06:46.625>point <00:06:46.765>is, <00:06:46.905>and <00:06:47.045>this <00:06:47.185>is <00:06:47.325>the <00:06:47.465>first <00:06:47.605>mistake <00:06:47.745>you

144
00:06:49.325 --> 00:06:51.605
<00:06:49.325>typically <00:06:49.500>do, <00:06:49.675>or <00:06:49.849>the <00:06:50.025>first <00:06:50.200>insight, <00:06:50.375>if <00:06:50.550>you <00:06:50.724>want

145
00:06:51.605 --> 00:06:53.045
<00:06:51.605>to <00:06:51.864>turn <00:06:52.123>it <00:06:52.382>into <00:06:52.641>something <00:06:52.901>positive,

146
00:06:53.065 --> 00:06:56.885
<00:06:53.065>the <00:06:53.192>first <00:06:53.319>insight <00:06:53.446>you <00:06:53.574>can <00:06:53.701>get <00:06:53.828>is <00:06:53.955>that <00:06:54.083>if <00:06:54.210>code <00:06:54.337>is <00:06:54.465>hard

147
00:06:56.885 --> 00:07:01.125
<00:06:56.885>to <00:06:57.060>test <00:06:57.235>in <00:06:57.409>99% <00:06:57.585>of <00:06:57.760>the <00:06:57.935>cases, <00:06:58.110>it's <00:06:58.284>not

148
00:07:01.125 --> 00:07:03.805
<00:07:01.125>because <00:07:01.358>it's <00:07:01.591>actually <00:07:01.825>hard <00:07:02.058>to <00:07:02.291>test, <00:07:02.525>but

149
00:07:03.805 --> 00:07:05.165
<00:07:03.805>because <00:07:04.111>your <00:07:04.417>code <00:07:04.723>is <00:07:05.029>crappy.

150
00:07:05.705 --> 00:07:07.845
<00:07:05.705>And, <00:07:05.844>uh, <00:07:05.984>this <00:07:06.125>is <00:07:06.265>very <00:07:06.405>hard <00:07:06.544>to <00:07:06.685>say <00:07:06.825>it <00:07:06.965>like <00:07:07.104>that,

151
00:07:08.345 --> 00:07:11.325
<00:07:08.345>but, <00:07:08.520>uh, <00:07:08.695>it's, <00:07:08.870>uh, <00:07:09.045>it's <00:07:09.220>actually, <00:07:09.395>it's <00:07:09.570>the <00:07:09.745>truth.

152
00:07:12.025 --> 00:07:14.685
<00:07:12.025>And, <00:07:12.224>uh, <00:07:12.424>this <00:07:12.625>is <00:07:12.825>typically, <00:07:13.025>uh, <00:07:13.224>an <00:07:13.424>idea

153
00:07:14.715 --> 00:07:17.125
<00:07:14.715>that <00:07:14.914>it's <00:07:15.114>something <00:07:15.315>it's <00:07:15.515>really <00:07:15.715>hard <00:07:15.914>to <00:07:16.114>test.

154
00:07:17.225 --> 00:07:21.005
<00:07:17.225>And <00:07:17.352>so <00:07:17.479>it, <00:07:17.606>uh, <00:07:17.734>to, <00:07:17.861>to <00:07:17.988>have <00:07:18.115>the <00:07:18.243>understanding <00:07:18.370>that <00:07:18.497>it's, <00:07:18.625>uh,

155
00:07:21.145 --> 00:07:23.245
<00:07:21.145>or <00:07:21.344>to <00:07:21.544>not <00:07:21.745>have <00:07:21.945>the <00:07:22.145>understanding <00:07:22.344>that <00:07:22.544>it's

156
00:07:23.245 --> 00:07:26.405
<00:07:23.245>because <00:07:23.420>your <00:07:23.595>code <00:07:23.770>is <00:07:23.945>broken <00:07:24.120>some <00:07:24.295>way, <00:07:24.470>uh, <00:07:24.645>but

157
00:07:26.405 --> 00:07:29.045
<00:07:26.405>because <00:07:26.604>you <00:07:26.804>think <00:07:27.005>that <00:07:27.205>testing <00:07:27.405>itself <00:07:27.604>is <00:07:27.804>hard.

158
00:07:29.315 --> 00:07:32.205
<00:07:29.315>This <00:07:29.548>is <00:07:29.781>especially <00:07:30.015>something <00:07:30.248>that <00:07:30.481>newcomers, <00:07:30.715>uh,

159
00:07:32.235 --> 00:07:35.045
<00:07:32.235>realize <00:07:32.468>when <00:07:32.701>they <00:07:32.935>first <00:07:33.168>deal <00:07:33.401>with <00:07:33.635>testing.

160
00:07:36.245 --> 00:07:37.615
<00:07:36.245>However, <00:07:37.478>sooner

161
00:07:37.715 --> 00:07:39.935
<00:07:37.715>or <00:07:37.995>later, <00:07:38.275>you <00:07:38.555>will <00:07:38.835>meet <00:07:39.115>someone

162
00:07:40.275 --> 00:07:42.735
<00:07:40.275>who <00:07:40.554>teaches <00:07:40.835>you <00:07:41.114>about <00:07:41.395>testing <00:07:41.674>fortunately.

163
00:07:43.395 --> 00:07:45.615
<00:07:43.395>So <00:07:43.628>you <00:07:43.861>will <00:07:44.094>meet <00:07:44.328>someone <00:07:44.561>who <00:07:44.794>says,

164
00:07:45.685 --> 00:07:46.855
<00:07:45.685>well, <00:07:46.036>testing <00:07:46.387>is <00:07:46.738>important.

165
00:07:46.915 --> 00:07:49.495
<00:07:46.915>And <00:07:47.115>you <00:07:47.315>say, <00:07:47.515>well, <00:07:47.715>yes, <00:07:47.915>I <00:07:48.115>think <00:07:48.315>so.

166
00:07:49.955 --> 00:07:51.295
<00:07:49.955>Two, <00:07:50.156>I've <00:07:50.357>heard <00:07:50.558>a <00:07:50.759>lot <00:07:50.960>about <00:07:51.161>it,

167
00:07:51.315 --> 00:07:53.855
<00:07:51.315>and <00:07:51.442>I <00:07:51.569>would, <00:07:51.696>maybe <00:07:51.824>I <00:07:51.951>would <00:07:52.078>like <00:07:52.205>to <00:07:52.333>do <00:07:52.460>something <00:07:52.587>about <00:07:52.715>it,

168
00:07:54.435 --> 00:07:56.015
<00:07:54.435>but, <00:07:54.668>uh, <00:07:54.901>I <00:07:55.135>don't <00:07:55.368>know <00:07:55.601>how <00:07:55.835>to,

169
00:07:56.015 --> 00:07:59.335
<00:07:56.015>because <00:07:56.190>most <00:07:56.365>parts <00:07:56.539>of <00:07:56.715>my <00:07:56.890>code <00:07:57.065>can't <00:07:57.240>be <00:07:57.414>tested.

170
00:07:59.595 --> 00:08:03.215
<00:07:59.595>And <00:07:59.795>then <00:07:59.995>this <00:08:00.195>other <00:08:00.395>person, <00:08:00.595>uh, <00:08:00.795>whoever <00:08:00.995>she

171
00:08:03.235 --> 00:08:06.615
<00:08:03.235>or <00:08:03.390>he <00:08:03.546>is, <00:08:03.701>says, <00:08:03.857>uh, <00:08:04.012>well, <00:08:04.168>that <00:08:04.323>can't <00:08:04.479>be <00:08:04.635>code.

172
00:08:06.715 --> 00:08:09.695
<00:08:06.715>Uh, <00:08:06.854>if <00:08:06.994>code <00:08:07.135>is <00:08:07.275>hard <00:08:07.414>to <00:08:07.554>test, <00:08:07.695>your <00:08:07.835>coat <00:08:07.974>is <00:08:08.114>broken.

173
00:08:09.875 --> 00:08:12.815
<00:08:09.875>And, <00:08:10.015>uh, <00:08:10.155>then <00:08:10.295>of <00:08:10.435>course <00:08:10.575>your <00:08:10.715>first <00:08:10.855>reaction <00:08:10.995>won't <00:08:11.135>be, <00:08:11.275>oh,

174
00:08:12.835 --> 00:08:14.455
<00:08:12.835>yes, <00:08:13.068>that's <00:08:13.301>because <00:08:13.534>my <00:08:13.768>coat <00:08:14.001>is <00:08:14.234>bad.

175
00:08:14.635 --> 00:08:16.975
<00:08:14.635>It <00:08:14.810>will <00:08:14.985>be, <00:08:15.159>no, <00:08:15.335>my <00:08:15.510>coat <00:08:15.685>isn't <00:08:15.860>bad. <00:08:16.034>Yeah.

176
00:08:16.995 --> 00:08:18.575
<00:08:16.995>And, <00:08:17.345>and <00:08:17.695>you <00:08:18.045>refuse <00:08:18.395>everything.

177
00:08:19.075 --> 00:08:21.975
<00:08:19.075>And, <00:08:19.215>um, <00:08:19.354>then, <00:08:19.495>uh, <00:08:19.635>if <00:08:19.775>you're, <00:08:19.914>if <00:08:20.055>you <00:08:20.195>are <00:08:20.335>very <00:08:20.474>lucky,

178
00:08:21.975 --> 00:08:23.615
<00:08:21.975>then <00:08:22.255>maybe <00:08:22.535>you <00:08:22.815>say <00:08:23.095>something <00:08:23.375>like,

179
00:08:23.885 --> 00:08:25.335
<00:08:23.885>well, <00:08:24.211>can <00:08:24.537>we <00:08:24.863>sit <00:08:25.190>together?

180
00:08:25.555 --> 00:08:27.255
<00:08:25.555>And, <00:08:25.788>uh, <00:08:26.021>the <00:08:26.255>other <00:08:26.488>person <00:08:26.721>says, <00:08:26.955>yes.

181
00:08:27.315 --> 00:08:30.255
<00:08:27.315>And <00:08:27.442>so <00:08:27.569>you <00:08:27.696>join <00:08:27.824>and <00:08:27.951>have <00:08:28.078>a <00:08:28.205>look <00:08:28.333>at <00:08:28.460>the <00:08:28.587>code <00:08:28.715>together,

182
00:08:30.915 --> 00:08:33.775
<00:08:30.915>and, <00:08:31.090>uh, <00:08:31.265>the <00:08:31.440>other <00:08:31.615>person <00:08:31.790>looks <00:08:31.965>at <00:08:32.140>your <00:08:32.315>code

183
00:08:33.795 --> 00:08:36.495
<00:08:33.794>and <00:08:34.074>says, <00:08:34.354>oh, <00:08:34.635>uh, <00:08:34.914>uh, <00:08:35.194>okay,

184
00:08:36.795 --> 00:08:40.055
<00:08:36.794>and <00:08:36.922>now <00:08:37.049>I <00:08:37.176>understand <00:08:37.304>why <00:08:37.431>you <00:08:37.558>can't <00:08:37.685>test <00:08:37.813>it, <00:08:37.940>uh, <00:08:38.067>uh, <00:08:38.194>easily.

185
00:08:40.795 --> 00:08:45.335
<00:08:40.794>And, <00:08:40.969>um, <00:08:41.145>the, <00:08:41.319>the <00:08:41.495>main <00:08:41.669>point <00:08:41.844>with <00:08:42.020>testing <00:08:42.194>here

186
00:08:45.915 --> 00:08:49.255
<00:08:45.915>is, <00:08:46.148>um, <00:08:46.381>code <00:08:46.615>is <00:08:46.848>easy <00:08:47.081>to <00:08:47.314>test.

187
00:08:49.875 --> 00:08:54.095
<00:08:49.875>If <00:08:50.002>what <00:08:50.129>you <00:08:50.256>want <00:08:50.384>to <00:08:50.511>test <00:08:50.638>is <00:08:50.765>very <00:08:50.893>small <00:08:51.020>and <00:08:51.147>very <00:08:51.275>isolated,

188
00:08:54.235 --> 00:08:55.805
<00:08:54.235>and <00:08:54.585>you <00:08:54.935>don't <00:08:55.285>have <00:08:55.635>lots

189
00:08:55.805 --> 00:08:57.765
<00:08:55.805>and <00:08:56.038>lots <00:08:56.271>of <00:08:56.505>dependencies <00:08:56.738>to <00:08:56.971>the <00:08:57.204>outside.

190
00:08:58.225 --> 00:09:01.325
<00:08:58.225>And, <00:08:58.400>uh, <00:08:58.575>this <00:08:58.750>is <00:08:58.925>the <00:08:59.100>typical, <00:08:59.275>uh, <00:08:59.450>textbook <00:08:59.625>example.

191
00:09:01.425 --> 00:09:04.245
<00:09:01.425>If <00:09:01.580>you <00:09:01.736>think <00:09:01.891>of <00:09:02.047>a <00:09:02.202>function <00:09:02.358>that <00:09:02.513>takes <00:09:02.669>two <00:09:02.824>numbers

192
00:09:05.105 --> 00:09:07.765
<00:09:05.105>and <00:09:05.305>adds <00:09:05.505>them, <00:09:05.705>so <00:09:05.905>it <00:09:06.105>calculates <00:09:06.305>their <00:09:06.505>sum

193
00:09:07.765 --> 00:09:11.925
<00:09:07.765>and <00:09:07.939>returns <00:09:08.115>the <00:09:08.290>sum, <00:09:08.465>this <00:09:08.640>is <00:09:08.814>easy <00:09:08.990>to <00:09:09.165>test.

194
00:09:12.065 --> 00:09:15.685
<00:09:12.065>And <00:09:12.240>the, <00:09:12.415>the, <00:09:12.590>the <00:09:12.765>fallacy <00:09:12.940>that <00:09:13.115>you, <00:09:13.290>uh, <00:09:13.465>yeah,

195
00:09:16.145 --> 00:09:18.965
<00:09:16.145>or <00:09:16.300>the, <00:09:16.456>the <00:09:16.611>mistake <00:09:16.767>that <00:09:16.922>you <00:09:17.078>do <00:09:17.233>is <00:09:17.389>to <00:09:17.545>assume

196
00:09:19.155 --> 00:09:21.765
<00:09:19.155>that <00:09:19.329>this <00:09:19.505>is <00:09:19.680>easy <00:09:19.855>because <00:09:20.030>it's <00:09:20.204>a <00:09:20.380>textbook <00:09:20.555>example.

197
00:09:22.305 --> 00:09:23.725
<00:09:22.305>And, <00:09:22.560>and <00:09:22.816>that <00:09:23.071>isn't <00:09:23.327>the <00:09:23.583>case.

198
00:09:23.795 --> 00:09:26.525
<00:09:23.795>It's <00:09:23.995>easy <00:09:24.194>because <00:09:24.395>it's <00:09:24.594>a <00:09:24.795>so-called <00:09:24.995>pure <00:09:25.194>function

199
00:09:26.525 --> 00:09:29.525
<00:09:26.525>that <00:09:26.680>is <00:09:26.836>a <00:09:26.991>function <00:09:27.147>which <00:09:27.302>does <00:09:27.458>not <00:09:27.613>have <00:09:27.769>any <00:09:27.925>dependencies,

200
00:09:29.525 --> 00:09:31.045
<00:09:29.525>which <00:09:29.752>does <00:09:29.981>not <00:09:30.209>have <00:09:30.437>any <00:09:30.665>side <00:09:30.892>effects.

201
00:09:31.235 --> 00:09:33.805
<00:09:31.235>It's <00:09:31.468>just <00:09:31.701>like <00:09:31.935>a <00:09:32.168>function <00:09:32.401>in <00:09:32.635>mathematics.

202
00:09:33.945 --> 00:09:36.685
<00:09:33.945>It <00:09:34.178>takes <00:09:34.411>some <00:09:34.645>things <00:09:34.878>as <00:09:35.111>parameters <00:09:35.345>in

203
00:09:36.905 --> 00:09:40.045
<00:09:36.905>and <00:09:37.060>returns <00:09:37.216>something <00:09:37.371>in, <00:09:37.527>in <00:09:37.682>a, <00:09:37.838>in <00:09:37.993>a <00:09:38.149>deterministic <00:09:38.305>way.

204
00:09:40.065 --> 00:09:42.445
<00:09:40.065>So <00:09:40.265>whenever <00:09:40.465>you <00:09:40.665>hand <00:09:40.865>in <00:09:41.065>the <00:09:41.265>same <00:09:41.465>things,

205
00:09:42.505 --> 00:09:44.645
<00:09:42.505>you <00:09:42.705>will <00:09:42.905>get <00:09:43.105>out <00:09:43.305>the <00:09:43.505>same <00:09:43.705>result <00:09:43.905>again.

206
00:09:44.945 --> 00:09:46.805
<00:09:44.945>And <00:09:45.145>so <00:09:45.345>this <00:09:45.545>is <00:09:45.745>what <00:09:45.945>makes <00:09:46.145>it <00:09:46.345>reproducible.

207
00:09:46.825 --> 00:09:49.165
<00:09:46.825>And <00:09:47.025>since <00:09:47.225>it <00:09:47.425>only <00:09:47.625>depends <00:09:47.825>on <00:09:48.025>the <00:09:48.225>input

208
00:09:49.165 --> 00:09:52.685
<00:09:49.165>and <00:09:49.320>not <00:09:49.476>some <00:09:49.631>external <00:09:49.787>states <00:09:49.942>said <00:09:50.098>that <00:09:50.253>somehow <00:09:50.409>you <00:09:50.564>have

209
00:09:52.685 --> 00:09:55.805
<00:09:52.685>to <00:09:52.812>build <00:09:52.939>up <00:09:53.066>first, <00:09:53.194>this <00:09:53.321>is <00:09:53.448>what <00:09:53.575>makes <00:09:53.703>it <00:09:53.830>easy <00:09:53.957>to <00:09:54.084>test.

210
00:09:55.865 --> 00:10:00.405
<00:09:55.865>And <00:09:56.065>if <00:09:56.265>your <00:09:56.465>code <00:09:56.665>primarily <00:09:56.865>consists <00:09:57.065>of <00:09:57.265>functions

211
00:10:00.405 --> 00:10:03.645
<00:10:00.405>that <00:10:00.560>work <00:10:00.716>like <00:10:00.871>this, <00:10:01.027>then <00:10:01.182>you <00:10:01.338>don't <00:10:01.493>have <00:10:01.649>any <00:10:01.805>problems.

212
00:10:03.705 --> 00:10:06.525
<00:10:03.705>And, <00:10:03.905>um, <00:10:04.105>this <00:10:04.305>means <00:10:04.505>that <00:10:04.705>to <00:10:04.905>have <00:10:05.105>code

213
00:10:06.555 --> 00:10:09.045
<00:10:06.555>that <00:10:06.755>is <00:10:06.954>testable <00:10:07.155>in <00:10:07.354>a <00:10:07.555>very <00:10:07.755>well <00:10:07.954>way

214
00:10:09.045 --> 00:10:13.325
<00:10:09.045>or <00:10:09.152>in <00:10:09.260>a, <00:10:09.368>in <00:10:09.475>a, <00:10:09.583>in <00:10:09.691>a <00:10:09.798>good <00:10:09.906>way, <00:10:10.014>um, <00:10:10.121>then, <00:10:10.229>uh, <00:10:10.337>this <00:10:10.444>means

215
00:10:13.475 --> 00:10:18.085
<00:10:13.475>that <00:10:13.650>you, <00:10:13.825>uh, <00:10:14.000>will <00:10:14.175>have <00:10:14.350>to <00:10:14.525>restructure <00:10:14.700>your <00:10:14.875>code.

216
00:10:18.085 --> 00:10:20.325
<00:10:18.085>You <00:10:18.240>will <00:10:18.396>have <00:10:18.551>to <00:10:18.707>change <00:10:18.862>the <00:10:19.018>structure <00:10:19.173>of <00:10:19.329>your <00:10:19.485>code

217
00:10:20.705 --> 00:10:23.605
<00:10:20.705>for <00:10:20.860>pieces <00:10:21.016>to <00:10:21.171>become <00:10:21.327>smaller <00:10:21.482>and <00:10:21.638>to <00:10:21.793>have <00:10:21.949>less <00:10:22.105>dependencies.

218
00:10:24.105 --> 00:10:28.445
<00:10:24.105>And <00:10:24.232>this <00:10:24.359>is <00:10:24.486>of <00:10:24.614>course, <00:10:24.741>hard, <00:10:24.868>but <00:10:24.995>once <00:10:25.123>you <00:10:25.250>start <00:10:25.377>with <00:10:25.505>this,

219
00:10:28.905 --> 00:10:31.405
<00:10:28.905>and <00:10:29.105>there <00:10:29.305>was <00:10:29.505>just <00:10:29.704>the <00:10:29.905>question, <00:10:30.105>uh, <00:10:30.305>uh,

220
00:10:31.405 --> 00:10:35.125
<00:10:31.405>should <00:10:31.545>a <00:10:31.685>developer <00:10:31.824>write <00:10:31.964>test <00:10:32.105>cases <00:10:32.245>first <00:10:32.385>and <00:10:32.525>then <00:10:32.665>the <00:10:32.805>code

221
00:10:35.225 --> 00:10:36.405
<00:10:35.225>or <00:10:35.490>the <00:10:35.756>other <00:10:36.021>way <00:10:36.287>around?

222
00:10:36.465 --> 00:10:38.965
<00:10:36.465>And <00:10:36.640>of <00:10:36.815>course, <00:10:36.990>I <00:10:37.165>just <00:10:37.340>mentioned <00:10:37.515>test <00:10:37.690>driven <00:10:37.865>development.

223
00:10:39.485 --> 00:10:42.645
<00:10:39.485>A <00:10:39.660>test <00:10:39.835>driven <00:10:40.010>development <00:10:40.185>already <00:10:40.360>gives <00:10:40.535>an <00:10:40.710>assumption <00:10:40.885>of,

224
00:10:42.785 --> 00:10:44.765
<00:10:42.785>um, <00:10:43.135>well, <00:10:43.485>it's <00:10:43.834>test <00:10:44.185>driven.

225
00:10:45.065 --> 00:10:48.565
<00:10:45.065>So <00:10:45.220>first, <00:10:45.376>right, <00:10:45.531>the <00:10:45.687>test <00:10:45.842>and <00:10:45.998>then <00:10:46.153>do <00:10:46.309>the <00:10:46.465>code.

226
00:10:48.985 --> 00:10:53.805
<00:10:48.985>Um, <00:10:49.101>so <00:10:49.218>if <00:10:49.335>you <00:10:49.451>follow <00:10:49.568>TDD, <00:10:49.685>um, <00:10:49.801>as <00:10:49.918>it's, <00:10:50.035>uh, <00:10:50.151>as <00:10:50.268>it's <00:10:50.385>meant,

227
00:10:54.075 --> 00:10:56.805
<00:10:54.075>then <00:10:54.202>you <00:10:54.329>first <00:10:54.456>write <00:10:54.584>the <00:10:54.711>test <00:10:54.838>and <00:10:54.965>then <00:10:55.093>you <00:10:55.220>write <00:10:55.347>the <00:10:55.475>code

228
00:10:56.825 --> 00:11:00.205
<00:10:56.825>and <00:10:56.980>the, <00:10:57.136>the <00:10:57.291>big, <00:10:57.447>um, <00:10:57.602>the <00:10:57.758>big, <00:10:57.913>uh, <00:10:58.069>chance <00:10:58.225>here,

229
00:11:00.225 --> 00:11:01.565
<00:11:00.225>the <00:11:00.526>big <00:11:00.828>opportunity <00:11:01.129>here <00:11:01.431>is,

230
00:11:01.865 --> 00:11:03.605
<00:11:01.865>and <00:11:02.145>whether <00:11:02.425>it's <00:11:02.705>always <00:11:02.985>the <00:11:03.265>case,

231
00:11:03.665 --> 00:11:05.325
<00:11:03.665>we <00:11:03.865>will <00:11:04.064>discuss <00:11:04.265>this <00:11:04.464>a <00:11:04.665>little <00:11:04.865>bit <00:11:05.064>later,

232
00:11:05.465 --> 00:11:08.885
<00:11:05.465>but <00:11:05.605>basically <00:11:05.745>the <00:11:05.885>idea <00:11:06.025>here, <00:11:06.165>since <00:11:06.305>you <00:11:06.445>first <00:11:06.585>write <00:11:06.725>the <00:11:06.865>test

233
00:11:09.305 --> 00:11:12.965
<00:11:09.305>and <00:11:09.444>then <00:11:09.584>the <00:11:09.724>code, <00:11:09.864>um, <00:11:10.005>since <00:11:10.145>you <00:11:10.285>have <00:11:10.425>to <00:11:10.564>write <00:11:10.704>code

234
00:11:12.965 --> 00:11:14.965
<00:11:12.965>that <00:11:13.315>somehow <00:11:13.665>fulfills <00:11:14.015>your <00:11:14.365>test

235
00:11:15.025 --> 00:11:18.805
<00:11:15.025>and <00:11:15.152>makes <00:11:15.279>the <00:11:15.406>tests <00:11:15.534>run, <00:11:15.661>uh, <00:11:15.788>you, <00:11:15.915>the, <00:11:16.043>the <00:11:16.170>tests <00:11:16.297>help <00:11:16.425>you

236
00:11:18.825 --> 00:11:19.965
<00:11:18.825>to <00:11:19.167>structure <00:11:19.509>your <00:11:19.851>code

237
00:11:19.965 --> 00:11:22.245
<00:11:19.965>and <00:11:20.165>to <00:11:20.365>write <00:11:20.565>code <00:11:20.765>that <00:11:20.965>is <00:11:21.165>easily <00:11:21.365>testable

238
00:11:22.435 --> 00:11:25.645
<00:11:22.435>because <00:11:22.574>the <00:11:22.714>test <00:11:22.854>is <00:11:22.994>there <00:11:23.135>first <00:11:23.275>and <00:11:23.415>then <00:11:23.555>follows <00:11:23.694>the <00:11:23.834>code

239
00:11:25.645 --> 00:11:26.725
<00:11:25.645>and <00:11:25.839>not <00:11:26.033>the <00:11:26.228>other <00:11:26.422>way <00:11:26.617>around.

240
00:11:27.305 --> 00:11:31.925
<00:11:27.305>So, <00:11:27.460>um, <00:11:27.616>dealing <00:11:27.771>with <00:11:27.927>TDD, <00:11:28.082>uh, <00:11:28.238>helps <00:11:28.393>you <00:11:28.549>a <00:11:28.704>lot

241
00:11:31.985 --> 00:11:33.405
<00:11:31.985>to <00:11:32.411>improve <00:11:32.837>the <00:11:33.262>structure

242
00:11:33.585 --> 00:11:36.005
<00:11:33.585>and <00:11:33.785>the, <00:11:33.985>yeah, <00:11:34.185>the <00:11:34.385>outline <00:11:34.585>of <00:11:34.785>your <00:11:34.985>code,

243
00:11:36.005 --> 00:11:37.445
<00:11:36.005>because <00:11:36.437>this <00:11:36.869>means <00:11:37.301>that

244
00:11:37.445 --> 00:11:39.765
<00:11:37.445>because <00:11:37.678>the <00:11:37.911>tests <00:11:38.145>go <00:11:38.378>first, <00:11:38.611>you <00:11:38.845>have

245
00:11:39.765 --> 00:11:43.525
<00:11:39.765>to <00:11:39.892>write <00:11:40.019>your <00:11:40.146>code <00:11:40.274>in <00:11:40.401>a <00:11:40.528>way <00:11:40.655>that <00:11:40.783>it <00:11:40.910>is <00:11:41.037>accessible, <00:11:41.165>uh,

246
00:11:43.525 --> 00:11:45.845
<00:11:43.525>because <00:11:43.699>otherwise <00:11:43.875>you <00:11:44.050>couldn't <00:11:44.225>have <00:11:44.400>written <00:11:44.574>the <00:11:44.750>test <00:11:44.925>before.

247
00:11:46.705 --> 00:11:50.525
<00:11:46.705>Um, <00:11:46.938>however, <00:11:47.171>there's <00:11:47.405>a <00:11:47.638>downside <00:11:47.871>to <00:11:48.105>this,

248
00:11:50.585 --> 00:11:53.125
<00:11:50.585>and <00:11:50.712>as <00:11:50.839>said, <00:11:50.966>we <00:11:51.094>will <00:11:51.221>talk <00:11:51.348>about <00:11:51.475>this <00:11:51.603>a <00:11:51.730>little <00:11:51.857>bit <00:11:51.985>later.

249
00:11:54.225 --> 00:11:55.605
<00:11:54.225>So <00:11:54.535>what <00:11:54.846>you <00:11:55.156>learn <00:11:55.467>is

250
00:11:55.605 --> 00:11:59.405
<00:11:55.605>that <00:11:55.805>good <00:11:56.005>testability <00:11:56.205>means <00:11:56.405>writing <00:11:56.605>well <00:11:56.805>structured <00:11:57.005>code.

251
00:11:59.465 --> 00:12:00.645
<00:11:59.465>And <00:11:59.677>when <00:11:59.889>you <00:12:00.102>deal <00:12:00.314>with <00:12:00.527>this,

252
00:12:00.645 --> 00:12:02.525
<00:12:00.645>and <00:12:00.819>if <00:12:00.995>you <00:12:01.170>get <00:12:01.345>better <00:12:01.520>at <00:12:01.694>this <00:12:01.870>over <00:12:02.045>time,

253
00:12:03.105 --> 00:12:06.085
<00:12:03.105>you <00:12:03.232>then <00:12:03.359>at <00:12:03.486>some <00:12:03.614>point <00:12:03.741>in <00:12:03.868>time <00:12:03.995>you <00:12:04.123>learn <00:12:04.250>about <00:12:04.377>code <00:12:04.505>coverage

254
00:12:06.585 --> 00:12:08.805
<00:12:06.585>and, <00:12:06.785>uh, <00:12:06.985>that <00:12:07.185>you <00:12:07.385>can <00:12:07.585>measure <00:12:07.785>how <00:12:07.985>much

255
00:12:08.805 --> 00:12:12.005
<00:12:08.805>of <00:12:08.960>your <00:12:09.116>code <00:12:09.271>is <00:12:09.427>being <00:12:09.582>tested <00:12:09.738>by <00:12:09.893>the <00:12:10.049>actual <00:12:10.204>tests,

256
00:12:12.505 --> 00:12:15.405
<00:12:12.505>and <00:12:12.645>then <00:12:12.785>suddenly <00:12:12.925>you, <00:12:13.064>you, <00:12:13.205>you <00:12:13.345>want <00:12:13.485>to <00:12:13.625>get <00:12:13.765>it, <00:12:13.905>yeah,

257
00:12:15.405 --> 00:12:16.485
<00:12:15.405>you, <00:12:15.729>you're <00:12:16.053>not <00:12:16.377>confident.

258
00:12:16.545 --> 00:12:18.085
<00:12:16.545>You, <00:12:16.822>you <00:12:17.099>maybe <00:12:17.376>you, <00:12:17.653>you, <00:12:17.931>uh,

259
00:12:18.085 --> 00:12:19.645
<00:12:18.085>calculate <00:12:18.435>your <00:12:18.785>first <00:12:19.135>code <00:12:19.485>coverage

260
00:12:19.645 --> 00:12:23.445
<00:12:19.645>and <00:12:19.800>it's <00:12:19.956>very <00:12:20.111>low, <00:12:20.267>about <00:12:20.422>17% <00:12:20.578>or <00:12:20.733>something <00:12:20.889>like <00:12:21.045>that.

261
00:12:23.785 --> 00:12:26.525
<00:12:23.785>But <00:12:23.892>then <00:12:24.000>you <00:12:24.108>get <00:12:24.215>the <00:12:24.323>idea, <00:12:24.431>well, <00:12:24.538>now <00:12:24.646>I <00:12:24.754>would <00:12:24.861>like <00:12:24.969>to <00:12:25.077>get <00:12:25.185>it.

262
00:12:26.545 --> 00:12:29.965
<00:12:26.545>Now <00:12:26.652>I <00:12:26.760>would <00:12:26.868>like <00:12:26.975>to <00:12:27.083>get <00:12:27.191>to <00:12:27.298>20% <00:12:27.406>or <00:12:27.514>to <00:12:27.621>30 <00:12:27.729>or <00:12:27.837>to <00:12:27.944>50.

263
00:12:30.065 --> 00:12:34.125
<00:12:30.065>And <00:12:30.192>the, <00:12:30.319>the, <00:12:30.446>the <00:12:30.574>further <00:12:30.701>you <00:12:30.828>get <00:12:30.955>the, <00:12:31.083>the <00:12:31.210>more <00:12:31.337>you <00:12:31.465>strike

264
00:12:34.225 --> 00:12:35.885
<00:12:34.225>for, <00:12:34.505>and <00:12:34.785>the <00:12:35.065>more <00:12:35.345>you <00:12:35.625>strive

265
00:12:36.145 --> 00:12:39.725
<00:12:36.145>for <00:12:36.425>achieving <00:12:36.704>actually <00:12:36.985>100% <00:12:37.265>code <00:12:37.545>coverage,

266
00:12:39.785 --> 00:12:42.405
<00:12:39.785>and <00:12:39.985>you <00:12:40.185>will, <00:12:40.385>this <00:12:40.584>is <00:12:40.785>a <00:12:40.985>good, <00:12:41.185>uh,

267
00:12:42.405 --> 00:12:44.165
<00:12:42.405>this <00:12:42.605>is <00:12:42.805>a <00:12:43.005>good <00:12:43.204>driver <00:12:43.405>in <00:12:43.605>the <00:12:43.805>beginning

268
00:12:44.355 --> 00:12:47.325
<00:12:44.355>because <00:12:44.510>it <00:12:44.666>enforces <00:12:44.821>you <00:12:44.977>and <00:12:45.132>it, <00:12:45.288>uh, <00:12:45.443>pushes <00:12:45.599>you <00:12:45.755>forward.

269
00:12:48.035 --> 00:12:51.645
<00:12:48.035>However, <00:12:48.175>if <00:12:48.314>you <00:12:48.454>follow <00:12:48.594>down <00:12:48.735>this <00:12:48.875>route, <00:12:49.015>you <00:12:49.155>have <00:12:49.295>the <00:12:49.435>problem

270
00:12:51.645 --> 00:12:54.125
<00:12:51.645>that <00:12:51.800>sooner <00:12:51.956>or <00:12:52.111>later <00:12:52.267>you <00:12:52.422>will <00:12:52.578>get <00:12:52.733>to <00:12:52.889>a <00:12:53.045>place

271
00:12:54.255 --> 00:12:56.765
<00:12:54.255>where <00:12:54.410>you <00:12:54.566>will <00:12:54.721>have, <00:12:54.877>where <00:12:55.032>you <00:12:55.188>will <00:12:55.343>have <00:12:55.499>a <00:12:55.655>problem

272
00:12:57.195 --> 00:12:59.685
<00:12:57.195>with <00:12:57.661>100% <00:12:58.128>code <00:12:58.595>coverage,

273
00:12:59.685 --> 00:13:03.365
<00:12:59.685>because <00:12:59.812>there <00:12:59.939>is <00:13:00.066>this, <00:13:00.194>uh, <00:13:00.321>there <00:13:00.448>is <00:13:00.575>one <00:13:00.703>single <00:13:00.830>piece <00:13:00.957>of <00:13:01.084>code

274
00:13:03.675 --> 00:13:06.885
<00:13:03.675>that <00:13:03.830>is <00:13:03.986>private <00:13:04.141>and, <00:13:04.297>uh, <00:13:04.452>well, <00:13:04.608>you, <00:13:04.763>you <00:13:04.919>don't <00:13:05.074>know,

275
00:13:07.125 --> 00:13:10.045
<00:13:07.125>you're <00:13:07.300>not <00:13:07.475>that <00:13:07.650>sure <00:13:07.825>how <00:13:08.000>to <00:13:08.175>test <00:13:08.350>private <00:13:08.525>code,

276
00:13:10.075 --> 00:13:12.605
<00:13:10.075>like <00:13:10.250>something <00:13:10.425>like <00:13:10.600>a <00:13:10.775>helper <00:13:10.950>function, <00:13:11.125>which <00:13:11.300>is <00:13:11.475>internal

277
00:13:12.745 --> 00:13:15.805
<00:13:12.745>or <00:13:12.885>some <00:13:13.025>private <00:13:13.165>state <00:13:13.305>of <00:13:13.445>an <00:13:13.585>object <00:13:13.725>or <00:13:13.865>something <00:13:14.005>like <00:13:14.145>that.

278
00:13:16.465 --> 00:13:21.165
<00:13:16.465>And, <00:13:16.592>uh, <00:13:16.719>then <00:13:16.846>people <00:13:16.974>start <00:13:17.101>to <00:13:17.228>think <00:13:17.355>about, <00:13:17.483>uh, <00:13:17.610>how <00:13:17.737>to, <00:13:17.865>uh,

279
00:13:21.305 --> 00:13:25.305
<00:13:21.305>access <00:13:21.479>things <00:13:21.655>that <00:13:21.829>are <00:13:22.005>private <00:13:22.180>to <00:13:22.354>make <00:13:22.530>them <00:13:22.704>appear,

280
00:13:25.765 --> 00:13:27.665
<00:13:25.765>not <00:13:26.045>private, <00:13:26.324>at <00:13:26.605>least <00:13:26.885>for <00:13:27.165>testing,

281
00:13:27.925 --> 00:13:29.905
<00:13:27.925>but <00:13:28.204>keeping <00:13:28.484>them <00:13:28.765>private <00:13:29.045>for <00:13:29.324>reality.

282
00:13:30.725 --> 00:13:33.225
<00:13:30.725>And, <00:13:30.900>uh, <00:13:31.075>lots <00:13:31.250>of <00:13:31.425>technical <00:13:31.600>ideas <00:13:31.775>then <00:13:31.950>come <00:13:32.125>up.

283
00:13:33.225 --> 00:13:36.385
<00:13:33.225>And <00:13:33.352>one <00:13:33.479>of <00:13:33.606>those <00:13:33.734>ideas <00:13:33.861>is, <00:13:33.988>well, <00:13:34.115>if <00:13:34.243>we <00:13:34.370>have <00:13:34.497>a <00:13:34.625>class

284
00:13:36.485 --> 00:13:37.985
<00:13:36.485>and <00:13:36.755>that <00:13:37.025>has <00:13:37.295>some <00:13:37.565>internal <00:13:37.835>state

285
00:13:38.045 --> 00:13:39.945
<00:13:38.045>and <00:13:38.219>we <00:13:38.395>would <00:13:38.569>like <00:13:38.745>to <00:13:38.920>test <00:13:39.094>this <00:13:39.270>internal <00:13:39.444>state,

286
00:13:39.965 --> 00:13:41.745
<00:13:39.965>but <00:13:40.165>we <00:13:40.365>can't <00:13:40.565>access <00:13:40.765>it <00:13:40.965>because <00:13:41.165>it's <00:13:41.365>internal,

287
00:13:41.975 --> 00:13:46.185
<00:13:41.975>then <00:13:42.150>let's <00:13:42.325>derive <00:13:42.500>our <00:13:42.675>test <00:13:42.850>cases <00:13:43.025>from <00:13:43.200>that <00:13:43.375>class,

288
00:13:46.925 --> 00:13:50.585
<00:13:46.925>uh, <00:13:47.080>with <00:13:47.236>the <00:13:47.391>idea <00:13:47.547>that <00:13:47.702>the <00:13:47.858>derived <00:13:48.013>class <00:13:48.169>has <00:13:48.324>access

289
00:13:50.645 --> 00:13:54.625
<00:13:50.645>to <00:13:50.800>its <00:13:50.956>base <00:13:51.111>classes, <00:13:51.267>properties, <00:13:51.422>even <00:13:51.578>if <00:13:51.733>they <00:13:51.889>are <00:13:52.045>protected

290
00:13:54.625 --> 00:13:56.145
<00:13:54.625>or <00:13:54.898>internal <00:13:55.172>or <00:13:55.445>something <00:13:55.719>like <00:13:55.992>that.

291
00:13:57.245 --> 00:14:00.945
<00:13:57.245>But <00:13:57.385>even <00:13:57.525>if <00:13:57.665>you, <00:13:57.805>if <00:13:57.945>you <00:13:58.085>only <00:13:58.225>just <00:13:58.365>say <00:13:58.505>that <00:13:58.645>sentence,

292
00:14:01.705 --> 00:14:03.865
<00:14:01.705>derive <00:14:01.938>your <00:14:02.171>tests <00:14:02.405>from <00:14:02.638>your <00:14:02.871>actual <00:14:03.105>code,

293
00:14:04.215 --> 00:14:05.545
<00:14:04.215>this <00:14:04.454>sounds <00:14:04.693>like <00:14:04.933>a <00:14:05.172>bad <00:14:05.411>idea

294
00:14:05.545 --> 00:14:09.865
<00:14:05.545>because, <00:14:05.672>uh, <00:14:05.799>well, <00:14:05.926>if <00:14:06.054>you, <00:14:06.181>uh, <00:14:06.308>it, <00:14:06.435>it, <00:14:06.563>it <00:14:06.690>means <00:14:06.817>you <00:14:06.944>can't,

295
00:14:09.925 --> 00:14:12.465
<00:14:09.925>uh, <00:14:10.125>seal <00:14:10.324>classes <00:14:10.525>or <00:14:10.724>mark <00:14:10.925>them <00:14:11.125>as <00:14:11.324>final.

296
00:14:13.165 --> 00:14:15.105
<00:14:13.165>Um, <00:14:13.444>it <00:14:13.724>only <00:14:14.005>works <00:14:14.285>for <00:14:14.564>classes.

297
00:14:15.325 --> 00:14:16.905
<00:14:15.325>It <00:14:15.605>doesn't <00:14:15.885>help <00:14:16.165>you <00:14:16.445>with <00:14:16.725>functions.

298
00:14:17.325 --> 00:14:20.505
<00:14:17.325>Uh, <00:14:17.500>you <00:14:17.675>maybe <00:14:17.850>have <00:14:18.025>to <00:14:18.200>change <00:14:18.375>modifiers <00:14:18.550>from <00:14:18.725>private

299
00:14:20.645 --> 00:14:22.265
<00:14:20.645>to <00:14:20.995>protected <00:14:21.345>so <00:14:21.694>that <00:14:22.045>the

300
00:14:22.825 --> 00:14:25.225
<00:14:22.825>derived <00:14:23.025>class <00:14:23.225>can <00:14:23.425>access <00:14:23.625>it <00:14:23.825>and <00:14:24.025>so <00:14:24.225>on.

301
00:14:25.285 --> 00:14:28.785
<00:14:25.285>So <00:14:25.440>while <00:14:25.596>deriving <00:14:25.751>tests <00:14:25.907>from <00:14:26.062>actual <00:14:26.218>code <00:14:26.373>sounds <00:14:26.529>like <00:14:26.685>a

302
00:14:28.785 --> 00:14:32.865
<00:14:28.785>pretty <00:14:28.940>bad <00:14:29.096>idea, <00:14:29.251>and <00:14:29.407>still <00:14:29.562>it's <00:14:29.718>done <00:14:29.873>very, <00:14:30.029>very <00:14:30.185>often.

303
00:14:32.865 --> 00:14:34.385
<00:14:32.865>Another <00:14:33.321>option <00:14:33.777>is, <00:14:34.233>uh,

304
00:14:34.445 --> 00:14:37.665
<00:14:34.445>you <00:14:34.678>could <00:14:34.911>use <00:14:35.145>reflection <00:14:35.378>especially.net <00:14:35.611>and <00:14:35.845>Java

305
00:14:37.725 --> 00:14:40.865
<00:14:37.725>and <00:14:37.900>those, <00:14:38.075>uh, <00:14:38.250>languages <00:14:38.425>that <00:14:38.600>are <00:14:38.775>built <00:14:38.950>on <00:14:39.125>a,

306
00:14:41.225 --> 00:14:45.625
<00:14:41.225>a <00:14:41.400>managed <00:14:41.575>run <00:14:41.750>time, <00:14:41.925>they <00:14:42.100>typically <00:14:42.275>offer, <00:14:42.450>uh, <00:14:42.625>reflection.

307
00:14:45.765 --> 00:14:49.025
<00:14:45.765>And, <00:14:45.998>uh, <00:14:46.231>yeah, <00:14:46.465>that's, <00:14:46.698>uh, <00:14:46.931>another <00:14:47.165>option

308
00:14:49.025 --> 00:14:50.745
<00:14:49.025>how <00:14:49.305>you <00:14:49.584>can <00:14:49.865>pro, <00:14:50.145>uh, <00:14:50.425>proceed.

309
00:14:51.225 --> 00:14:53.405
<00:14:51.225>But <00:14:51.425>it <00:14:51.625>feels <00:14:51.825>wrong <00:14:52.025>if <00:14:52.225>you <00:14:52.425>do <00:14:52.625>it.

310
00:14:53.405 --> 00:14:56.045
<00:14:53.405>If <00:14:53.560>you, <00:14:53.716>if <00:14:53.871>you <00:14:54.027>try <00:14:54.182>to <00:14:54.338>deal <00:14:54.493>with, <00:14:54.649>uh, <00:14:54.805>reflection,

311
00:14:56.045 --> 00:14:59.645
<00:14:56.045>it <00:14:56.200>feels <00:14:56.356>like, <00:14:56.511>well, <00:14:56.667>trying <00:14:56.822>to <00:14:56.978>drill <00:14:57.133>down <00:14:57.289>into <00:14:57.444>something

312
00:14:59.645 --> 00:15:02.165
<00:14:59.645>that <00:14:59.819>was <00:14:59.995>not <00:15:00.170>meant <00:15:00.345>to <00:15:00.520>be <00:15:00.694>drilled <00:15:00.870>down <00:15:01.045>into.

313
00:15:02.585 --> 00:15:05.245
<00:15:02.585>So <00:15:02.725>this <00:15:02.865>seems <00:15:03.005>to <00:15:03.145>be <00:15:03.285>a <00:15:03.425>pretty <00:15:03.565>bad <00:15:03.705>idea <00:15:03.845>as <00:15:03.985>well.

314
00:15:05.785 --> 00:15:07.405
<00:15:05.785>And, <00:15:06.018>uh, <00:15:06.251>what <00:15:06.485>you <00:15:06.718>should <00:15:06.951>actually <00:15:07.185>do,

315
00:15:07.405 --> 00:15:09.965
<00:15:07.405>if <00:15:07.545>you <00:15:07.685>ever <00:15:07.824>are <00:15:07.964>in <00:15:08.105>the <00:15:08.245>case <00:15:08.385>where <00:15:08.525>you <00:15:08.665>ask <00:15:08.805>yourself,

316
00:15:10.225 --> 00:15:12.365
<00:15:10.225>how <00:15:10.400>do <00:15:10.575>I <00:15:10.750>can <00:15:10.925>contest <00:15:11.100>this <00:15:11.275>as <00:15:11.450>private <00:15:11.625>code,

317
00:15:12.705 --> 00:15:14.125
<00:15:12.705>you <00:15:12.960>should <00:15:13.216>take <00:15:13.471>a <00:15:13.727>step <00:15:13.983>back

318
00:15:14.305 --> 00:15:16.845
<00:15:14.305>and <00:15:14.460>ask <00:15:14.616>yourself, <00:15:14.771>why <00:15:14.927>do <00:15:15.082>you <00:15:15.238>want <00:15:15.393>to <00:15:15.549>test <00:15:15.704>this?

319
00:15:16.845 --> 00:15:20.205
<00:15:16.845>Because <00:15:17.045>for <00:15:17.245>private <00:15:17.445>code, <00:15:17.645>there <00:15:17.845>are <00:15:18.045>basically, <00:15:18.245>um,

320
00:15:20.415 --> 00:15:22.085
<00:15:20.415>there <00:15:20.648>is <00:15:20.881>one <00:15:21.115>reason <00:15:21.348>why <00:15:21.581>it <00:15:21.814>exists.

321
00:15:22.925 --> 00:15:25.305
<00:15:22.925>And <00:15:23.099>the <00:15:23.275>first <00:15:23.449>reason <00:15:23.625>why <00:15:23.800>private <00:15:23.974>code <00:15:24.150>exists <00:15:24.324>is

322
00:15:25.375 --> 00:15:28.305
<00:15:25.375>because <00:15:25.655>it's <00:15:25.935>related <00:15:26.215>to <00:15:26.495>some <00:15:26.775>internals,

323
00:15:28.805 --> 00:15:32.945
<00:15:28.805>but <00:15:28.979>these <00:15:29.155>internals <00:15:29.329>are <00:15:29.505>not <00:15:29.680>there, <00:15:29.854>uh, <00:15:30.030>for <00:15:30.204>themselves,

324
00:15:33.285 --> 00:15:36.545
<00:15:33.285>but <00:15:33.440>they <00:15:33.596>are <00:15:33.751>being <00:15:33.907>used <00:15:34.062>by <00:15:34.218>some <00:15:34.373>other <00:15:34.529>code <00:15:34.685>typically,

325
00:15:36.565 --> 00:15:39.425
<00:15:36.565>and <00:15:36.765>this <00:15:36.965>other <00:15:37.165>code <00:15:37.365>typically <00:15:37.565>is <00:15:37.765>public <00:15:37.965>code.

326
00:15:39.645 --> 00:15:42.385
<00:15:39.645>So <00:15:39.800>the <00:15:39.956>idea <00:15:40.111>here <00:15:40.267>is <00:15:40.422>that <00:15:40.578>maybe <00:15:40.733>you <00:15:40.889>don't <00:15:41.045>need

327
00:15:42.385 --> 00:15:45.025
<00:15:42.385>to <00:15:42.665>test <00:15:42.944>the <00:15:43.225>private <00:15:43.505>code <00:15:43.785>directly,

328
00:15:45.045 --> 00:15:47.785
<00:15:45.045>but <00:15:45.219>maybe <00:15:45.395>it's <00:15:45.569>okay <00:15:45.745>to <00:15:45.920>test <00:15:46.094>it <00:15:46.270>just <00:15:46.444>indirectly

329
00:15:47.785 --> 00:15:50.145
<00:15:47.785>because <00:15:47.985>you <00:15:48.185>just <00:15:48.385>want <00:15:48.584>to <00:15:48.785>test <00:15:48.985>the <00:15:49.185>behavior

330
00:15:50.565 --> 00:15:51.585
<00:15:50.565>of <00:15:50.871>the <00:15:51.177>public <00:15:51.483>code.

331
00:15:51.585 --> 00:15:54.745
<00:15:51.585>And <00:15:51.740>if <00:15:51.896>the <00:15:52.051>public <00:15:52.207>code <00:15:52.362>uses <00:15:52.518>the <00:15:52.673>private <00:15:52.829>code, <00:15:52.985>well,

332
00:15:55.185 --> 00:15:57.185
<00:15:55.185>actually <00:15:55.385>you <00:15:55.584>don't <00:15:55.785>care <00:15:55.984>that <00:15:56.185>it's <00:15:56.385>private <00:15:56.584>code

333
00:15:57.185 --> 00:15:58.945
<00:15:57.185>because <00:15:57.535>that's <00:15:57.885>an <00:15:58.234>implementation <00:15:58.584>detail.

334
00:15:59.015 --> 00:16:01.905
<00:15:59.015>What <00:15:59.189>you <00:15:59.365>care <00:15:59.540>about <00:15:59.715>in <00:15:59.890>testing <00:16:00.064>is <00:16:00.240>the <00:16:00.415>interface,

335
00:16:01.905 --> 00:16:03.785
<00:16:01.905>the <00:16:02.185>outer <00:16:02.464>structure, <00:16:02.745>the <00:16:03.025>outer <00:16:03.305>form,

336
00:16:04.525 --> 00:16:07.865
<00:16:04.525>and, <00:16:04.699>uh, <00:16:04.875>this <00:16:05.050>is <00:16:05.225>I <00:16:05.400>think, <00:16:05.574>something <00:16:05.750>that, <00:16:05.925>uh,

337
00:16:08.275 --> 00:16:09.505
<00:16:08.275>needs <00:16:08.496>to <00:16:08.717>come <00:16:08.939>to <00:16:09.160>your <00:16:09.382>mind.

338
00:16:09.725 --> 00:16:13.345
<00:16:09.725>And, <00:16:09.958>uh, <00:16:10.191>if <00:16:10.425>there's, <00:16:10.658>um, <00:16:10.891>private <00:16:11.125>code

339
00:16:13.415 --> 00:16:16.545
<00:16:13.415>that <00:16:13.570>is <00:16:13.726>not <00:16:13.881>being <00:16:14.037>used <00:16:14.192>by <00:16:14.348>some <00:16:14.503>publicly <00:16:14.659>available <00:16:14.814>code,

340
00:16:17.215 --> 00:16:19.945
<00:16:17.215>then <00:16:17.370>the <00:16:17.526>first <00:16:17.681>question <00:16:17.837>should <00:16:17.992>be <00:16:18.148>why <00:16:18.303>it's <00:16:18.459>even <00:16:18.615>there,

341
00:16:19.945 --> 00:16:22.425
<00:16:19.945>because, <00:16:20.145>uh, <00:16:20.345>then <00:16:20.545>apparently <00:16:20.745>no <00:16:20.945>one <00:16:21.145>is <00:16:21.345>using

342
00:16:22.895 --> 00:16:24.145
<00:16:22.895>this <00:16:23.457>code <00:16:24.020>essentially.

343
00:16:24.285 --> 00:16:26.425
<00:16:24.285>So <00:16:24.635>mistake <00:16:24.985>number <00:16:25.334>two, <00:16:25.685>uh,

344
00:16:26.535 --> 00:16:28.065
<00:16:26.535>besides, <00:16:26.994>uh, <00:16:27.453>thinking, <00:16:27.912>uh,

345
00:16:28.065 --> 00:16:30.625
<00:16:28.065>your <00:16:28.265>code <00:16:28.465>is <00:16:28.665>too <00:16:28.865>complex <00:16:29.065>to <00:16:29.265>get <00:16:29.465>tested.

346
00:16:30.625 --> 00:16:33.425
<00:16:30.625>Mistake <00:16:30.825>number <00:16:31.025>two <00:16:31.225>is <00:16:31.425>typically, <00:16:31.625>um, <00:16:31.825>putting <00:16:32.025>lots

347
00:16:33.425 --> 00:16:36.745
<00:16:33.425>of <00:16:33.599>effort <00:16:33.775>into <00:16:33.949>testing <00:16:34.125>private <00:16:34.300>code <00:16:34.474>with <00:16:34.650>the <00:16:34.824>goal

348
00:16:36.745 --> 00:16:41.425
<00:16:36.745>of <00:16:36.920>achieving <00:16:37.095>100% <00:16:37.270>code <00:16:37.445>coverage, <00:16:37.620>which <00:16:37.795>is <00:16:37.970>a <00:16:38.145>goal,

349
00:16:41.725 --> 00:16:44.185
<00:16:41.725>but <00:16:41.925>which <00:16:42.125>is <00:16:42.325>not <00:16:42.525>an <00:16:42.725>absolute <00:16:42.925>measure <00:16:43.125>here.

350
00:16:45.095 --> 00:16:47.315
<00:16:45.095>Um, <00:16:45.445>regarding <00:16:45.795>the <00:16:46.145>question, <00:16:46.495>uh,

351
00:16:47.335 --> 00:16:49.755
<00:16:47.335>how <00:16:47.510>would <00:16:47.685>you <00:16:47.860>approach <00:16:48.035>implementing <00:16:48.210>automated <00:16:48.385>tests <00:16:48.560>in <00:16:48.735>an

352
00:16:50.035 --> 00:16:52.035
<00:16:50.035>existing <00:16:50.268>software <00:16:50.501>project <00:16:50.735>that <00:16:50.968>has <00:16:51.201>none <00:16:51.435>yet.

353
00:16:52.575 --> 00:16:56.995
<00:16:52.575>Um, <00:16:52.702>I <00:16:52.829>would <00:16:52.956>like <00:16:53.084>to <00:16:53.211>push <00:16:53.338>this <00:16:53.465>question <00:16:53.593>a <00:16:53.720>little <00:16:53.847>bit, <00:16:53.975>uh,

354
00:16:57.465 --> 00:17:00.315
<00:16:57.465>more <00:16:57.572>to <00:16:57.680>the <00:16:57.788>end <00:16:57.895>of <00:16:58.003>the <00:16:58.111>talk, <00:16:58.218>but <00:16:58.326>I <00:16:58.434>will <00:16:58.541>get <00:16:58.649>back <00:16:58.757>to <00:16:58.865>it.

355
00:17:01.835 --> 00:17:02.855
<00:17:01.835>So, <00:17:02.294>uh, <00:17:02.753>yeah.

356
00:17:03.225 --> 00:17:06.535
<00:17:03.225>Third <00:17:03.458>thing <00:17:03.691>is, <00:17:03.925>um, <00:17:04.158>by <00:17:04.391>the <00:17:04.625>way,

357
00:17:06.755 --> 00:17:10.695
<00:17:06.755>not <00:17:06.895>testing <00:17:07.035>private <00:17:07.175>code <00:17:07.315>does <00:17:07.455>not <00:17:07.595>mean <00:17:07.735>you <00:17:07.875>cannot <00:17:08.015>reach <00:17:08.155>100%

358
00:17:10.695 --> 00:17:14.575
<00:17:10.694>code <00:17:10.869>coverage, <00:17:11.044>because <00:17:11.220>code <00:17:11.395>coverage <00:17:11.569>does <00:17:11.744>not <00:17:11.919>say, <00:17:12.095>well,

359
00:17:14.725 --> 00:17:16.735
<00:17:14.724>this <00:17:14.925>line <00:17:15.125>of <00:17:15.324>code, <00:17:15.524>there <00:17:15.724>is <00:17:15.925>a <00:17:16.125>test

360
00:17:16.735 --> 00:17:18.775
<00:17:16.734>that <00:17:16.968>directly <00:17:17.201>tests <00:17:17.435>this <00:17:17.668>line <00:17:17.901>of <00:17:18.135>code.

361
00:17:19.955 --> 00:17:22.975
<00:17:19.954>It <00:17:20.110>just <00:17:20.266>says <00:17:20.421>that <00:17:20.577>there <00:17:20.732>is <00:17:20.888>at <00:17:21.043>least <00:17:21.199>one <00:17:21.355>test

362
00:17:23.485 --> 00:17:26.135
<00:17:23.484>that <00:17:23.685>if <00:17:23.885>it <00:17:24.084>is <00:17:24.284>being <00:17:24.484>run, <00:17:24.685>uh, <00:17:24.885>leads

363
00:17:26.155 --> 00:17:27.935
<00:17:26.155>to <00:17:26.504>this <00:17:26.855>code <00:17:27.204>being <00:17:27.555>executed.

364
00:17:28.115 --> 00:17:32.055
<00:17:28.115>So <00:17:28.231>even <00:17:28.348>if <00:17:28.464>private <00:17:28.581>code <00:17:28.698>is <00:17:28.815>being <00:17:28.931>run <00:17:29.048>in <00:17:29.165>an <00:17:29.281>indirect <00:17:29.398>way <00:17:29.515>from

365
00:17:32.055 --> 00:17:33.655
<00:17:32.055>a <00:17:32.255>test, <00:17:32.455>it <00:17:32.655>still <00:17:32.855>counts <00:17:33.055>to <00:17:33.255>co, <00:17:33.455>uh,

366
00:17:33.655 --> 00:17:35.215
<00:17:33.655>to <00:17:33.888>test <00:17:34.121>coverage <00:17:34.355>or <00:17:34.588>to <00:17:34.821>code <00:17:35.055>coverage.

367
00:17:35.725 --> 00:17:38.615
<00:17:35.725>However, <00:17:36.004>there <00:17:36.284>will <00:17:36.564>actually <00:17:36.844>be <00:17:37.125>things

368
00:17:38.805 --> 00:17:40.175
<00:17:38.805>that <00:17:39.113>are <00:17:39.421>hard <00:17:39.729>to <00:17:40.038>test.

369
00:17:41.115 --> 00:17:44.375
<00:17:41.115>And, <00:17:41.270>um, <00:17:41.426>as <00:17:41.581>I, <00:17:41.737>as <00:17:41.892>I <00:17:42.048>already <00:17:42.203>said, <00:17:42.359>what's <00:17:42.515>easy

370
00:17:44.375 --> 00:17:48.135
<00:17:44.375>to <00:17:44.575>test <00:17:44.775>are <00:17:44.975>pure <00:17:45.175>functions <00:17:45.375>with, <00:17:45.575>um, <00:17:45.775>uh,

371
00:17:48.375 --> 00:17:51.005
<00:17:48.375>deterministic <00:17:48.655>results, <00:17:48.935>uh, <00:17:49.215>with <00:17:49.495>no <00:17:49.775>state,

372
00:17:51.145 --> 00:17:52.965
<00:17:51.145>no <00:17:51.425>external <00:17:51.705>dependencies <00:17:51.985>and <00:17:52.264>so <00:17:52.545>on.

373
00:17:53.145 --> 00:17:56.085
<00:17:53.145>But <00:17:53.300>sometimes <00:17:53.456>you <00:17:53.611>have <00:17:53.767>code <00:17:53.922>that <00:17:54.078>has <00:17:54.233>all <00:17:54.389>these <00:17:54.545>things.

374
00:17:56.905 --> 00:18:00.445
<00:17:56.905>And, <00:17:57.045>uh, <00:17:57.185>one <00:17:57.325>of <00:17:57.465>those <00:17:57.605>things <00:17:57.745>that <00:17:57.885>I <00:17:58.024>have, <00:17:58.165>uh, <00:17:58.305>yeah,

375
00:18:00.445 --> 00:18:02.885
<00:18:00.445>that <00:18:00.600>I <00:18:00.756>have <00:18:00.911>stumbled <00:18:01.067>upon <00:18:01.222>a <00:18:01.378>lot <00:18:01.533>in <00:18:01.689>my <00:18:01.845>past.

376
00:18:03.305 --> 00:18:05.725
<00:18:03.305>Uh, <00:18:03.432>I <00:18:03.559>have <00:18:03.686>been <00:18:03.814>working <00:18:03.941>a <00:18:04.068>few <00:18:04.195>years <00:18:04.323>ago <00:18:04.450>on <00:18:04.577>a <00:18:04.705>peer

377
00:18:05.725 --> 00:18:09.485
<00:18:05.725>to <00:18:05.852>peer <00:18:05.979>network, <00:18:06.106>and <00:18:06.234>we <00:18:06.361>were <00:18:06.488>trying <00:18:06.615>to <00:18:06.743>test, <00:18:06.870>uh, <00:18:06.997>this, <00:18:07.125>uh,

378
00:18:09.835 --> 00:18:11.405
<00:18:09.835>peer <00:18:10.185>to <00:18:10.535>peer <00:18:10.885>networking <00:18:11.235>stuff.

379
00:18:11.665 --> 00:18:16.405
<00:18:11.665>And <00:18:11.840>this <00:18:12.014>was <00:18:12.190>pretty <00:18:12.365>hard <00:18:12.540>because <00:18:12.715>it <00:18:12.889>is <00:18:13.065>non-deterministic

380
00:18:16.405 --> 00:18:20.525
<00:18:16.405>because <00:18:16.560>you, <00:18:16.716>uh, <00:18:16.871>depend <00:18:17.027>on <00:18:17.182>timing <00:18:17.338>of <00:18:17.493>the <00:18:17.649>operating <00:18:17.805>system,

381
00:18:20.625 --> 00:18:22.245
<00:18:20.625>on <00:18:20.905>timing <00:18:21.185>of <00:18:21.465>the <00:18:21.745>network <00:18:22.025>stack

382
00:18:22.705 --> 00:18:25.605
<00:18:22.705>and <00:18:22.985>on, <00:18:23.264>uh, <00:18:23.544>cross <00:18:23.824>server <00:18:24.105>things.

383
00:18:25.665 --> 00:18:29.925
<00:18:25.665>And <00:18:25.820>it's <00:18:25.976>very, <00:18:26.131>very <00:18:26.287>hard <00:18:26.442>to, <00:18:26.598>uh, <00:18:26.753>build <00:18:26.909>these <00:18:27.065>things

384
00:18:29.985 --> 00:18:31.445
<00:18:29.985>and <00:18:30.313>to, <00:18:30.641>um, <00:18:30.970>and <00:18:31.299>to,

385
00:18:31.445 --> 00:18:33.725
<00:18:31.445>and <00:18:31.620>to <00:18:31.794>cause <00:18:31.970>things <00:18:32.145>in <00:18:32.320>a <00:18:32.495>deterministic <00:18:32.669>way <00:18:32.845>here.

386
00:18:34.105 --> 00:18:37.205
<00:18:34.105>So <00:18:34.280>whenever <00:18:34.455>you <00:18:34.630>are <00:18:34.805>dealing <00:18:34.980>with <00:18:35.155>networking <00:18:35.330>with <00:18:35.505>things

387
00:18:37.205 --> 00:18:41.405
<00:18:37.205>that <00:18:37.345>depend <00:18:37.485>on <00:18:37.625>time, <00:18:37.764>on <00:18:37.905>threading <00:18:38.044>and, <00:18:38.185>and <00:18:38.324>things <00:18:38.465>like <00:18:38.605>that,

388
00:18:41.405 --> 00:18:44.725
<00:18:41.405>and <00:18:41.638>you <00:18:41.871>cannot <00:18:42.105>easily, <00:18:42.338>uh, <00:18:42.571>simulate <00:18:42.805>them,

389
00:18:44.915 --> 00:18:45.965
<00:18:44.915>then <00:18:45.151>you <00:18:45.387>have <00:18:45.623>a <00:18:45.860>problem.

390
00:18:46.305 --> 00:18:50.245
<00:18:46.305>And <00:18:46.445>then <00:18:46.585>it <00:18:46.725>will <00:18:46.865>become <00:18:47.005>very, <00:18:47.145>very <00:18:47.285>difficult <00:18:47.425>to <00:18:47.565>write <00:18:47.705>tests,

391
00:18:50.425 --> 00:18:52.045
<00:18:50.425>at <00:18:50.705>least <00:18:50.985>to <00:18:51.264>write <00:18:51.544>unit <00:18:51.825>tests

392
00:18:52.185 --> 00:18:54.805
<00:18:52.185>or <00:18:52.418>very <00:18:52.651>fine <00:18:52.885>granular <00:18:53.118>tests <00:18:53.351>for <00:18:53.585>this.

393
00:18:55.225 --> 00:18:57.365
<00:18:55.225>And <00:18:55.399>if <00:18:55.574>you <00:18:55.750>come <00:18:55.925>to <00:18:56.100>this, <00:18:56.274>you, <00:18:56.449>you <00:18:56.625>need

394
00:18:57.365 --> 00:18:58.685
<00:18:57.365>to <00:18:57.534>think <00:18:57.704>about <00:18:57.874>how <00:18:58.043>you <00:18:58.213>can <00:18:58.383>test <00:18:58.553>this.

395
00:18:58.685 --> 00:19:01.245
<00:18:58.685>This <00:18:58.840>is <00:18:58.996>the <00:18:59.151>first <00:18:59.307>thing, <00:18:59.462>but <00:18:59.618>this <00:18:59.773>then <00:18:59.929>leads <00:19:00.085>to,

396
00:19:01.385 --> 00:19:04.285
<00:19:01.385>you <00:19:01.618>won't <00:19:01.851>have <00:19:02.085>100%, <00:19:02.318>uh, <00:19:02.551>test <00:19:02.785>coverage.

397
00:19:04.345 --> 00:19:05.525
<00:19:04.345>And <00:19:04.610>the <00:19:04.876>thing <00:19:05.141>here <00:19:05.407>is,

398
00:19:05.525 --> 00:19:07.765
<00:19:05.525>and <00:19:05.758>this <00:19:05.991>is <00:19:06.225>mistake <00:19:06.458>number <00:19:06.691>three, <00:19:06.925>um,

399
00:19:08.265 --> 00:19:12.445
<00:19:08.265>100% <00:19:08.465>test <00:19:08.665>coverage <00:19:08.865>is <00:19:09.065>often <00:19:09.265>a <00:19:09.465>false <00:19:09.665>positive.

400
00:19:12.445 --> 00:19:15.565
<00:19:12.445>Because <00:19:12.645>when, <00:19:12.845>if <00:19:13.044>somebody, <00:19:13.245>if <00:19:13.445>somebody <00:19:13.645>says <00:19:13.845>you

401
00:19:15.665 --> 00:19:20.085
<00:19:15.665>or <00:19:15.805>tells <00:19:15.945>you <00:19:16.085>that, <00:19:16.225>yay, <00:19:16.365>we <00:19:16.504>have <00:19:16.645>100% <00:19:16.784>test <00:19:16.925>coverage, <00:19:17.065>um,

402
00:19:20.315 --> 00:19:23.565
<00:19:20.315>this <00:19:20.490>sounds <00:19:20.665>great, <00:19:20.840>but <00:19:21.015>actually <00:19:21.190>it <00:19:21.365>doesn't <00:19:21.540>say <00:19:21.715>anything

403
00:19:23.565 --> 00:19:26.445
<00:19:23.565>because <00:19:23.765>it <00:19:23.965>only <00:19:24.165>means <00:19:24.365>that <00:19:24.565>every <00:19:24.765>single <00:19:24.965>line

404
00:19:26.445 --> 00:19:29.765
<00:19:26.445>of <00:19:26.645>code <00:19:26.845>is <00:19:27.044>being <00:19:27.245>touched <00:19:27.445>by <00:19:27.645>some <00:19:27.845>test.

405
00:19:29.825 --> 00:19:32.925
<00:19:29.825>It <00:19:30.000>doesn't <00:19:30.175>tell <00:19:30.350>you <00:19:30.525>anything <00:19:30.700>about <00:19:30.875>if <00:19:31.050>the <00:19:31.225>tests

406
00:19:32.955 --> 00:19:35.525
<00:19:32.955>that <00:19:33.188>are <00:19:33.421>being <00:19:33.655>run <00:19:33.888>make <00:19:34.121>any <00:19:34.355>sense.

407
00:19:35.865 --> 00:19:38.685
<00:19:35.865>It, <00:19:36.005>it <00:19:36.145>just <00:19:36.285>means, <00:19:36.425>well, <00:19:36.565>every <00:19:36.705>line <00:19:36.845>of <00:19:36.985>code <00:19:37.125>was <00:19:37.265>somehow

408
00:19:39.285 --> 00:19:41.485
<00:19:39.285>executed, <00:19:39.485>but <00:19:39.685>you <00:19:39.885>don't <00:19:40.085>know <00:19:40.285>in <00:19:40.485>what <00:19:40.685>context

409
00:19:41.665 --> 00:19:43.205
<00:19:41.665>and <00:19:41.896>with <00:19:42.127>what <00:19:42.358>goals <00:19:42.589>and <00:19:42.820>so <00:19:43.051>on.

410
00:19:43.625 --> 00:19:46.725
<00:19:43.625>So <00:19:43.905>yeah, <00:19:44.185>well, <00:19:44.465>100% <00:19:44.745>sounds <00:19:45.025>great,

411
00:19:46.785 --> 00:19:49.485
<00:19:46.785>but <00:19:46.985>in <00:19:47.185>reality, <00:19:47.385>it's <00:19:47.585>not <00:19:47.785>that <00:19:47.985>great <00:19:48.185>necessarily.

412
00:19:50.065 --> 00:19:52.325
<00:19:50.065>On <00:19:50.240>the <00:19:50.415>other <00:19:50.590>hand, <00:19:50.765>if <00:19:50.940>somebody <00:19:51.115>tells <00:19:51.290>you, <00:19:51.465>well,

413
00:19:52.385 --> 00:19:54.125
<00:19:52.385>we <00:19:52.618>have <00:19:52.851>a <00:19:53.085>very <00:19:53.318>low <00:19:53.551>test <00:19:53.785>coverage,

414
00:19:54.555 --> 00:19:56.525
<00:19:54.555>this <00:19:54.755>is <00:19:54.955>actually <00:19:55.155>something <00:19:55.355>you <00:19:55.555>can <00:19:55.755>work <00:19:55.955>with,

415
00:19:56.525 --> 00:20:00.285
<00:19:56.525>because <00:19:56.665>if <00:19:56.805>you <00:19:56.945>only <00:19:57.085>have <00:19:57.225>a <00:19:57.365>test <00:19:57.505>coverage <00:19:57.645>of <00:19:57.785>20%, <00:19:57.925>yeah,

416
00:20:00.285 --> 00:20:03.845
<00:20:00.285>then <00:20:00.425>you <00:20:00.565>are <00:20:00.705>probably <00:20:00.845>missing, <00:20:00.985>uh, <00:20:01.125>quite <00:20:01.265>a <00:20:01.405>number <00:20:01.545>of <00:20:01.685>tests

417
00:20:03.845 --> 00:20:05.005
<00:20:03.845>because <00:20:04.889>80%

418
00:20:05.005 --> 00:20:08.245
<00:20:05.005>of <00:20:05.145>your <00:20:05.285>code <00:20:05.425>is <00:20:05.565>not <00:20:05.705>even <00:20:05.845>being <00:20:05.985>touched <00:20:06.125>by <00:20:06.265>a <00:20:06.405>test.

419
00:20:08.465 --> 00:20:13.445
<00:20:08.465>So <00:20:08.665>don't <00:20:08.865>strive <00:20:09.064>for <00:20:09.264>this <00:20:09.465>100%, <00:20:09.665>um, <00:20:09.865>as,

420
00:20:13.585 --> 00:20:14.845
<00:20:13.585>uh, <00:20:13.963>an <00:20:14.341>absolute <00:20:14.719>ideal.

421
00:20:15.065 --> 00:20:17.565
<00:20:15.065>You, <00:20:15.265>you <00:20:15.465>won't <00:20:15.665>make <00:20:15.865>it <00:20:16.065>there <00:20:16.265>most <00:20:16.465>probably,

422
00:20:18.145 --> 00:20:21.005
<00:20:18.145>and <00:20:18.320>even <00:20:18.495>if <00:20:18.670>you <00:20:18.845>do, <00:20:19.020>um, <00:20:19.195>the <00:20:19.370>question <00:20:19.545>is

423
00:20:21.235 --> 00:20:23.165
<00:20:21.235>what <00:20:21.514>this <00:20:21.794>number <00:20:22.074>actually <00:20:22.354>tells <00:20:22.635>you,

424
00:20:23.185 --> 00:20:26.685
<00:20:23.185>and <00:20:23.360>where <00:20:23.534>I'm <00:20:23.710>very, <00:20:23.885>very <00:20:24.060>cautious <00:20:24.235>in <00:20:24.409>general <00:20:24.585>is

425
00:20:26.985 --> 00:20:29.165
<00:20:26.985>to <00:20:27.185>have <00:20:27.385>some <00:20:27.584>settings <00:20:27.784>on <00:20:27.985>a <00:20:28.185>build <00:20:28.385>server.

426
00:20:29.595 --> 00:20:33.005
<00:20:29.595>Like, <00:20:29.795>um, <00:20:29.995>well, <00:20:30.195>the <00:20:30.395>test <00:20:30.595>coverage <00:20:30.795>must <00:20:30.995>be

427
00:20:33.095 --> 00:20:34.765
<00:20:33.095>above <00:20:34.495>85%

428
00:20:34.765 --> 00:20:38.525
<00:20:34.765>because <00:20:34.940>maybe <00:20:35.115>you <00:20:35.290>added <00:20:35.465>some <00:20:35.640>super <00:20:35.815>complex <00:20:35.990>networking <00:20:36.165>code

429
00:20:38.945 --> 00:20:42.445
<00:20:38.945>and <00:20:39.085>it <00:20:39.225>just <00:20:39.365>can't <00:20:39.504>be <00:20:39.645>easily <00:20:39.784>tested <00:20:39.925>in <00:20:40.064>an <00:20:40.205>automated <00:20:40.345>way,

430
00:20:42.445 --> 00:20:44.765
<00:20:42.445>and <00:20:42.600>now <00:20:42.756>your <00:20:42.911>test <00:20:43.067>coverage <00:20:43.222>goes <00:20:43.378>down, <00:20:43.533>you <00:20:43.689>can't <00:20:43.845>merge.

431
00:20:45.185 --> 00:20:47.285
<00:20:45.185>So <00:20:45.418>the <00:20:45.651>only <00:20:45.885>option <00:20:46.118>left <00:20:46.351>then <00:20:46.585>is

432
00:20:47.305 --> 00:20:50.925
<00:20:47.305>to <00:20:47.505>either <00:20:47.705>adjust <00:20:47.905>the <00:20:48.105>build <00:20:48.305>server <00:20:48.505>configuration, <00:20:48.705>uh,

433
00:20:50.935 --> 00:20:53.285
<00:20:50.935>which <00:20:51.135>you <00:20:51.335>probably <00:20:51.534>aren't <00:20:51.735>even <00:20:51.935>allowed <00:20:52.135>to <00:20:52.335>do,

434
00:20:53.745 --> 00:20:58.275
<00:20:53.745>or <00:20:53.919>to <00:20:54.094>add <00:20:54.270>some, <00:20:54.445>yeah, <00:20:54.620>some <00:20:54.794>fake <00:20:54.969>tests <00:20:55.145>to,

435
00:20:58.375 --> 00:21:01.955
<00:20:58.375>to <00:20:58.515>bring <00:20:58.655>up <00:20:58.795>code <00:20:58.935>coverage <00:20:59.075>again, <00:20:59.215>which <00:20:59.355>is <00:20:59.495>also <00:20:59.635>not, <00:20:59.775>uh,

436
00:21:02.145 --> 00:21:03.395
<00:21:02.145>what <00:21:02.426>you <00:21:02.707>should <00:21:02.988>actually <00:21:03.270>do.

437
00:21:03.535 --> 00:21:08.315
<00:21:03.535>And <00:21:03.735>so <00:21:03.935>avoid <00:21:04.135>falling <00:21:04.335>into <00:21:04.535>this <00:21:04.735>100% <00:21:04.935>trap,

438
00:21:08.495 --> 00:21:11.515
<00:21:08.495>uh, <00:21:08.635>unless <00:21:08.774>you're <00:21:08.915>writing <00:21:09.054>a, <00:21:09.195>a, <00:21:09.334>a <00:21:09.475>textbook <00:21:09.614>on <00:21:09.754>the <00:21:09.895>topic,

439
00:21:11.575 --> 00:21:13.275
<00:21:11.575>of <00:21:11.808>course, <00:21:12.041>then <00:21:12.275>you <00:21:12.508>can <00:21:12.741>do <00:21:12.975>this.

440
00:21:14.795 --> 00:21:16.855
<00:21:14.795>Now, <00:21:15.075>over <00:21:15.355>time, <00:21:15.635>you <00:21:15.915>will <00:21:16.195>learn

441
00:21:16.855 --> 00:21:18.815
<00:21:16.855>that <00:21:17.088>there <00:21:17.321>are <00:21:17.555>different <00:21:17.788>kinds <00:21:18.021>of <00:21:18.255>tests.

442
00:21:19.115 --> 00:21:21.375
<00:21:19.115>Uh, <00:21:19.315>there <00:21:19.515>are, <00:21:19.715>I <00:21:19.915>already <00:21:20.115>mentioned <00:21:20.315>unit <00:21:20.515>tests.

443
00:21:21.665 --> 00:21:24.775
<00:21:21.665>Those <00:21:21.898>are <00:21:22.131>typically <00:21:22.365>tests <00:21:22.598>for <00:21:22.831>small <00:21:23.065>functions,

444
00:21:24.785 --> 00:21:28.015
<00:21:24.785>which <00:21:24.960>are <00:21:25.135>independent <00:21:25.310>of <00:21:25.485>each <00:21:25.660>other, <00:21:25.835>which <00:21:26.010>are <00:21:26.185>isolated.

445
00:21:28.635 --> 00:21:31.255
<00:21:28.635>And <00:21:28.835>then <00:21:29.035>there <00:21:29.235>are <00:21:29.435>tests, <00:21:29.635>uh, <00:21:29.835>that, <00:21:30.035>yeah,

446
00:21:31.285 --> 00:21:33.335
<00:21:31.285>that <00:21:31.635>test <00:21:31.985>things <00:21:32.335>in <00:21:32.685>combination.

447
00:21:33.355 --> 00:21:34.895
<00:21:33.355>So <00:21:33.701>you <00:21:34.048>have <00:21:34.394>multiple <00:21:34.741>functions.

448
00:21:34.915 --> 00:21:38.175
<00:21:34.915>You <00:21:35.090>have <00:21:35.264>maybe, <00:21:35.440>uh, <00:21:35.615>uh, <00:21:35.790>functions <00:21:35.965>within <00:21:36.139>a <00:21:36.315>class

449
00:21:38.175 --> 00:21:39.895
<00:21:38.175>that <00:21:38.455>work <00:21:38.735>together, <00:21:39.014>maybe <00:21:39.294>some <00:21:39.575>classes

450
00:21:40.045 --> 00:21:41.215
<00:21:40.045>that <00:21:40.308>work <00:21:40.571>with <00:21:40.834>each <00:21:41.098>other.

451
00:21:41.795 --> 00:21:45.735
<00:21:41.795>And <00:21:41.935>this <00:21:42.075>is <00:21:42.215>typically <00:21:42.355>not <00:21:42.495>regarded <00:21:42.635>anymore <00:21:42.775>as <00:21:42.915>a <00:21:43.055>unit <00:21:43.195>test.

452
00:21:45.735 --> 00:21:48.415
<00:21:45.735>This <00:21:45.968>is <00:21:46.201>more <00:21:46.435>a <00:21:46.668>so-called <00:21:46.901>integration <00:21:47.135>test

453
00:21:48.415 --> 00:21:51.855
<00:21:48.415>because <00:21:48.615>it <00:21:48.815>doesn't <00:21:49.014>test <00:21:49.215>a <00:21:49.415>single <00:21:49.615>unit <00:21:49.815>isolated,

454
00:21:52.275 --> 00:21:54.535
<00:21:52.275>but <00:21:52.555>the <00:21:52.835>integration <00:21:53.115>of <00:21:53.395>multiple <00:21:53.675>units,

455
00:21:55.605 --> 00:21:56.945
<00:21:55.605>and <00:21:55.906>as <00:21:56.208>I <00:21:56.509>already <00:21:56.811>said,

456
00:21:56.975 --> 00:21:59.185
<00:21:56.975>pure <00:21:57.208>functions <00:21:57.441>are <00:21:57.675>pretty <00:21:57.908>easy <00:21:58.141>to <00:21:58.375>test.

457
00:21:59.845 --> 00:22:01.785
<00:21:59.845>Uh, <00:22:00.078>if <00:22:00.311>you <00:22:00.545>don't <00:22:00.778>have <00:22:01.011>bio <00:22:01.245>functions,

458
00:22:01.785 --> 00:22:03.985
<00:22:01.785>if <00:22:01.960>you <00:22:02.135>have <00:22:02.310>dependencies, <00:22:02.485>if <00:22:02.660>you <00:22:02.835>have <00:22:03.010>state, <00:22:03.185>uh,

459
00:22:03.985 --> 00:22:05.905
<00:22:03.985>things <00:22:04.185>are <00:22:04.385>not <00:22:04.584>that <00:22:04.784>easy <00:22:04.985>to <00:22:05.185>test <00:22:05.385>anymore.

460
00:22:06.005 --> 00:22:09.705
<00:22:06.005>So <00:22:06.205>naturally, <00:22:06.405>integration <00:22:06.605>tests <00:22:06.805>are <00:22:07.005>way <00:22:07.205>more <00:22:07.405>complex,

461
00:22:10.325 --> 00:22:11.585
<00:22:10.325>um, <00:22:10.703>than <00:22:11.081>unit <00:22:11.459>tests.

462
00:22:11.605 --> 00:22:12.985
<00:22:11.605>And <00:22:11.853>the, <00:22:12.101>the <00:22:12.350>question <00:22:12.598>is, <00:22:12.847>and,

463
00:22:12.985 --> 00:22:15.745
<00:22:12.985>and <00:22:13.125>this <00:22:13.264>is <00:22:13.405>one <00:22:13.544>of <00:22:13.685>the <00:22:13.824>most <00:22:13.965>important <00:22:14.104>questions <00:22:14.245>here, <00:22:14.385>um,

464
00:22:15.805 --> 00:22:18.745
<00:22:15.805>if <00:22:15.960>we're <00:22:16.116>talking <00:22:16.271>about <00:22:16.427>dependencies, <00:22:16.582>how <00:22:16.738>do <00:22:16.893>you <00:22:17.049>do <00:22:17.205>that?

465
00:22:19.045 --> 00:22:22.105
<00:22:19.045>And <00:22:19.200>so <00:22:19.356>people <00:22:19.511>typically, <00:22:19.667>especially <00:22:19.822>if <00:22:19.978>you're <00:22:20.133>coming <00:22:20.289>from <00:22:20.445>a,

466
00:22:22.105 --> 00:22:25.345
<00:22:22.105>from <00:22:22.305>an <00:22:22.505>object <00:22:22.705>oriented <00:22:22.905>background, <00:22:23.105>people <00:22:23.305>typically <00:22:23.505>start

467
00:22:25.605 --> 00:22:28.945
<00:22:25.605>to, <00:22:25.838>uh, <00:22:26.071>use, <00:22:26.305>uh, <00:22:26.538>di <00:22:26.771>uh, <00:22:27.005>frameworks,

468
00:22:28.945 --> 00:22:32.225
<00:22:28.945>dependency <00:22:29.145>injection <00:22:29.345>frameworks <00:22:29.544>like, <00:22:29.745>uh, <00:22:29.945>a <00:22:30.145>service <00:22:30.345>locator

469
00:22:32.285 --> 00:22:33.945
<00:22:32.285>or <00:22:32.635>a <00:22:32.985>dependency <00:22:33.335>injection <00:22:33.685>container

470
00:22:33.945 --> 00:22:35.825
<00:22:33.945>or <00:22:34.178>something <00:22:34.411>like <00:22:34.645>that <00:22:34.878>to <00:22:35.111>decouple <00:22:35.345>things.

471
00:22:36.485 --> 00:22:38.825
<00:22:36.485>And <00:22:36.718>basically, <00:22:36.951>this <00:22:37.185>is <00:22:37.418>a <00:22:37.651>good <00:22:37.885>thing.

472
00:22:39.485 --> 00:22:42.985
<00:22:39.485>But <00:22:39.640>complexity <00:22:39.796>here <00:22:39.951>can <00:22:40.107>be <00:22:40.262>very, <00:22:40.418>very <00:22:40.573>high <00:22:40.729>as <00:22:40.885>asset,

473
00:22:42.985 --> 00:22:45.905
<00:22:42.985>especially <00:22:43.185>in <00:22:43.385>ob <00:22:43.584>in <00:22:43.784>object <00:22:43.985>oriented <00:22:44.185>programming <00:22:44.385>languages,

474
00:22:45.965 --> 00:22:48.785
<00:22:45.965>in <00:22:46.245>classical <00:22:46.524>object <00:22:46.804>oriented <00:22:47.084>programming <00:22:47.365>languages,

475
00:22:48.855 --> 00:22:52.545
<00:22:48.855>because <00:22:49.055>maybe <00:22:49.255>all <00:22:49.455>you <00:22:49.655>want, <00:22:49.855>there's <00:22:50.055>this, <00:22:50.255>uh,

476
00:22:52.545 --> 00:22:56.785
<00:22:52.545>there's <00:22:52.685>this <00:22:52.825>really <00:22:52.965>great <00:22:53.105>quote <00:22:53.245>from <00:22:53.385>Alan <00:22:53.525>KI <00:22:53.665>love <00:22:53.805>that, <00:22:53.945>um,

477
00:22:57.325 --> 00:23:00.105
<00:22:57.325>is, <00:22:57.500>uh, <00:22:57.675>the <00:22:57.850>problem <00:22:58.025>with <00:22:58.200>object-oriented <00:22:58.375>programming <00:22:58.550>is <00:22:58.725>all

478
00:23:00.105 --> 00:23:02.905
<00:23:00.105>you <00:23:00.232>wanted <00:23:00.359>was <00:23:00.486>that <00:23:00.614>banana, <00:23:00.741>but <00:23:00.868>what <00:23:00.995>you <00:23:01.123>got <00:23:01.250>was <00:23:01.377>the <00:23:01.505>banana

479
00:23:03.245 --> 00:23:05.105
<00:23:03.245>and <00:23:03.524>the <00:23:03.804>gorilla <00:23:04.084>holding <00:23:04.364>the <00:23:04.645>banana

480
00:23:05.365 --> 00:23:07.105
<00:23:05.365>and <00:23:05.645>the <00:23:05.925>entire <00:23:06.205>jungle <00:23:06.485>around <00:23:06.765>it.

481
00:23:07.685 --> 00:23:11.665
<00:23:07.685>And, <00:23:07.812>uh, <00:23:07.939>what <00:23:08.066>you, <00:23:08.194>what <00:23:08.321>you <00:23:08.448>often <00:23:08.575>have <00:23:08.703>is, <00:23:08.830>uh, <00:23:08.957>that, <00:23:09.085>well,

482
00:23:12.085 --> 00:23:13.825
<00:23:12.085>the <00:23:12.318>component <00:23:12.551>you <00:23:12.785>would <00:23:13.018>like <00:23:13.251>to <00:23:13.485>test

483
00:23:13.825 --> 00:23:16.665
<00:23:13.825>with <00:23:14.025>an <00:23:14.225>integration <00:23:14.425>test, <00:23:14.625>well, <00:23:14.825>it <00:23:15.025>needs, <00:23:15.225>uh,

484
00:23:16.885 --> 00:23:18.785
<00:23:16.885>to <00:23:17.165>get <00:23:17.445>injected <00:23:17.725>a <00:23:18.004>logger, <00:23:18.285>uh,

485
00:23:18.805 --> 00:23:21.945
<00:23:18.805>but <00:23:18.960>to <00:23:19.116>inject <00:23:19.271>this <00:23:19.427>logger <00:23:19.582>to <00:23:19.738>create <00:23:19.893>a <00:23:20.049>logger <00:23:20.205>instance,

486
00:23:21.945 --> 00:23:23.145
<00:23:21.945>you <00:23:22.161>have <00:23:22.377>to <00:23:22.592>inject <00:23:22.809>something <00:23:23.025>else,

487
00:23:23.205 --> 00:23:25.705
<00:23:23.205>and <00:23:23.379>you <00:23:23.554>get <00:23:23.730>this <00:23:23.905>chain <00:23:24.080>of <00:23:24.254>things, <00:23:24.429>this <00:23:24.605>chain

488
00:23:25.705 --> 00:23:29.345
<00:23:25.705>of <00:23:25.860>dependencies, <00:23:26.016>what <00:23:26.171>you <00:23:26.327>all <00:23:26.482>have <00:23:26.638>to <00:23:26.793>initialize <00:23:26.949>and <00:23:27.105>create

489
00:23:29.485 --> 00:23:31.825
<00:23:29.485>and <00:23:29.685>then <00:23:29.885>wire <00:23:30.084>together <00:23:30.284>so <00:23:30.485>that <00:23:30.685>things <00:23:30.885>work.

490
00:23:31.885 --> 00:23:36.185
<00:23:31.885>So <00:23:32.012>this <00:23:32.139>is <00:23:32.266>a, <00:23:32.394>as, <00:23:32.521>as, <00:23:32.648>as <00:23:32.775>nice <00:23:32.903>as <00:23:33.030>dependency <00:23:33.157>inversion <00:23:33.285>is,

491
00:23:36.205 --> 00:23:40.225
<00:23:36.205>and <00:23:36.360>as <00:23:36.516>nice <00:23:36.671>as <00:23:36.827>dependency <00:23:36.982>injection <00:23:37.138>is, <00:23:37.293>it <00:23:37.449>can <00:23:37.605>lead

492
00:23:40.245 --> 00:23:42.105
<00:23:40.245>to <00:23:40.711>very <00:23:41.178>long <00:23:41.645>chains.

493
00:23:42.105 --> 00:23:46.845
<00:23:42.105>And <00:23:42.260>then <00:23:42.416>the <00:23:42.571>typical <00:23:42.727>solution <00:23:42.882>here <00:23:43.038>in <00:23:43.193>air <00:23:43.349>quotes <00:23:43.505>is

494
00:23:46.985 --> 00:23:49.445
<00:23:46.985>to <00:23:47.264>work <00:23:47.544>with <00:23:47.824>mocks, <00:23:48.104>with <00:23:48.385>stops,

495
00:23:49.445 --> 00:23:50.925
<00:23:49.445>with <00:23:49.778>fakes, <00:23:50.110>something <00:23:50.444>like <00:23:50.777>that.

496
00:23:51.225 --> 00:23:54.285
<00:23:51.225>So <00:23:51.365>then, <00:23:51.504>so <00:23:51.645>that <00:23:51.784>you <00:23:51.925>don't <00:23:52.064>put <00:23:52.205>in <00:23:52.344>the <00:23:52.485>original <00:23:52.625>component

497
00:23:54.665 --> 00:23:58.445
<00:23:54.665>or <00:23:54.840>the <00:23:55.014>original <00:23:55.190>dependency, <00:23:55.365>but, <00:23:55.540>uh, <00:23:55.715>fake <00:23:55.889>dependency, <00:23:56.065>and,

498
00:23:58.445 --> 00:24:02.045
<00:23:58.445>and <00:23:58.585>this <00:23:58.725>is <00:23:58.865>especially <00:23:59.004>in <00:23:59.145>object, <00:23:59.284>sorry, <00:23:59.425>if <00:23:59.564>I <00:23:59.705>always <00:23:59.845>now,

499
00:24:02.225 --> 00:24:05.565
<00:24:02.225>uh, <00:24:02.399>yeah, <00:24:02.574>push <00:24:02.750>on <00:24:02.925>the, <00:24:03.100>uh, <00:24:03.274>object <00:24:03.449>oriented <00:24:03.625>stuff.

500
00:24:05.945 --> 00:24:08.325
<00:24:05.945>Uh, <00:24:06.145>if <00:24:06.345>we're <00:24:06.544>talking <00:24:06.745>about <00:24:06.945>object <00:24:07.145>oriented <00:24:07.345>programming

501
00:24:08.525 --> 00:24:11.245
<00:24:08.525>languages, <00:24:08.680>it's <00:24:08.836>not <00:24:08.991>that <00:24:09.147>easy <00:24:09.302>to <00:24:09.458>come <00:24:09.613>up <00:24:09.769>with <00:24:09.925>mocks

502
00:24:11.245 --> 00:24:12.885
<00:24:11.245>and <00:24:11.478>stops <00:24:11.711>and <00:24:11.945>fakes <00:24:12.178>and <00:24:12.411>so <00:24:12.645>on,

503
00:24:12.885 --> 00:24:15.805
<00:24:12.885>because <00:24:13.040>you <00:24:13.196>typically <00:24:13.351>have <00:24:13.507>a <00:24:13.662>type <00:24:13.818>system <00:24:13.973>where <00:24:14.129>you <00:24:14.285>have

504
00:24:15.805 --> 00:24:17.685
<00:24:15.805>to <00:24:16.085>inherit <00:24:16.365>from <00:24:16.645>some <00:24:16.925>base <00:24:17.205>classes

505
00:24:17.825 --> 00:24:19.765
<00:24:17.825>or <00:24:18.058>you <00:24:18.291>have <00:24:18.525>to <00:24:18.758>implement <00:24:18.991>some <00:24:19.225>interfaces,

506
00:24:19.765 --> 00:24:22.565
<00:24:19.765>and <00:24:19.905>you <00:24:20.045>need <00:24:20.185>to <00:24:20.325>do <00:24:20.465>all <00:24:20.605>these <00:24:20.745>things <00:24:20.885>with <00:24:21.025>your <00:24:21.165>mocks

507
00:24:22.565 --> 00:24:24.285
<00:24:22.565>and <00:24:22.740>stops <00:24:22.915>and <00:24:23.090>fakes <00:24:23.265>and <00:24:23.440>so <00:24:23.615>on <00:24:23.790>as <00:24:23.965>well,

508
00:24:24.825 --> 00:24:28.005
<00:24:24.825>unless <00:24:25.058>you're <00:24:25.291>using <00:24:25.525>some <00:24:25.758>framework <00:24:25.991>that, <00:24:26.225>uh,

509
00:24:28.075 --> 00:24:29.325
<00:24:28.075>puts <00:24:28.356>some <00:24:28.637>magic <00:24:28.918>on <00:24:29.200>it,

510
00:24:29.425 --> 00:24:33.725
<00:24:29.425>and <00:24:29.580>every <00:24:29.736>time <00:24:29.891>you <00:24:30.047>use <00:24:30.202>magic, <00:24:30.358>well, <00:24:30.513>that's <00:24:30.669>a <00:24:30.825>guarantee

511
00:24:33.725 --> 00:24:35.485
<00:24:33.725>to <00:24:34.004>cause <00:24:34.284>problems <00:24:34.564>sooner <00:24:34.844>or <00:24:35.125>later.

512
00:24:36.305 --> 00:24:40.045
<00:24:36.305>And <00:24:36.460>a <00:24:36.616>really, <00:24:36.771>uh, <00:24:36.927>a <00:24:37.082>really <00:24:37.238>important <00:24:37.393>thing <00:24:37.549>about <00:24:37.705>mocks

513
00:24:40.045 --> 00:24:44.085
<00:24:40.045>and <00:24:40.172>code <00:24:40.299>is <00:24:40.426>that <00:24:40.554>you <00:24:40.681>can <00:24:40.808>never <00:24:40.935>be <00:24:41.063>sure <00:24:41.190>that <00:24:41.317>the <00:24:41.445>mocks

514
00:24:44.925 --> 00:24:48.565
<00:24:44.925>actually <00:24:45.100>behave <00:24:45.274>as <00:24:45.450>their <00:24:45.625>original, <00:24:45.800>that <00:24:45.975>they <00:24:46.149>are <00:24:46.325>meant

515
00:24:48.705 --> 00:24:51.645
<00:24:48.705>to <00:24:48.845>mock, <00:24:48.985>because <00:24:49.125>this <00:24:49.264>is <00:24:49.405>the <00:24:49.544>worst <00:24:49.685>thing <00:24:49.824>that <00:24:49.965>can <00:24:50.105>happen.

516
00:24:52.155 --> 00:24:55.045
<00:24:52.155>It's <00:24:52.310>even, <00:24:52.466>so, <00:24:52.621>suppose <00:24:52.777>you <00:24:52.932>want <00:24:53.088>to <00:24:53.243>test <00:24:53.399>some <00:24:53.555>code

517
00:24:55.045 --> 00:24:56.685
<00:24:55.045>and <00:24:55.220>you <00:24:55.395>need <00:24:55.570>to <00:24:55.745>access <00:24:55.920>the <00:24:56.095>database <00:24:56.270>for <00:24:56.445>it,

518
00:24:56.865 --> 00:25:00.525
<00:24:56.865>and <00:24:56.992>you <00:24:57.119>don't <00:24:57.246>have <00:24:57.374>any <00:24:57.501>clue <00:24:57.628>of <00:24:57.755>how <00:24:57.883>to <00:24:58.010>access <00:24:58.137>the <00:24:58.265>database,

519
00:25:00.635 --> 00:25:03.845
<00:25:00.635>then <00:25:00.762>you <00:25:00.889>might <00:25:01.016>say, <00:25:01.144>well, <00:25:01.271>then <00:25:01.398>let's <00:25:01.525>not <00:25:01.653>write <00:25:01.780>tests <00:25:01.907>for <00:25:02.035>it.

520
00:25:04.875 --> 00:25:07.365
<00:25:04.875>This <00:25:05.075>is <00:25:05.275>not <00:25:05.475>nice, <00:25:05.675>but <00:25:05.875>at <00:25:06.075>least <00:25:06.275>everyone

521
00:25:07.365 --> 00:25:08.685
<00:25:07.365>knows, <00:25:07.602>okay, <00:25:07.840>we <00:25:08.077>don't <00:25:08.315>have <00:25:08.553>tests.

522
00:25:09.145 --> 00:25:13.245
<00:25:09.145>What's <00:25:09.272>way <00:25:09.399>worse <00:25:09.526>is <00:25:09.654>if <00:25:09.781>you <00:25:09.908>say, <00:25:10.035>well, <00:25:10.163>let's <00:25:10.290>create <00:25:10.417>a <00:25:10.545>mock

523
00:25:13.265 --> 00:25:15.205
<00:25:13.265>for <00:25:13.498>this <00:25:13.731>database <00:25:13.965>and <00:25:14.198>let's <00:25:14.431>inject <00:25:14.665>it

524
00:25:15.205 --> 00:25:17.205
<00:25:15.205>and <00:25:15.438>then <00:25:15.671>write <00:25:15.905>tests <00:25:16.138>against <00:25:16.371>this <00:25:16.605>mock,

525
00:25:17.705 --> 00:25:18.925
<00:25:17.705>and <00:25:18.071>everything <00:25:18.437>is <00:25:18.803>green

526
00:25:18.925 --> 00:25:21.445
<00:25:18.925>because <00:25:19.100>everyone <00:25:19.274>assumes, <00:25:19.450>well, <00:25:19.625>the <00:25:19.800>tests <00:25:19.975>we, <00:25:20.149>we <00:25:20.325>have,

527
00:25:21.505 --> 00:25:24.125
<00:25:21.505>we <00:25:21.680>now <00:25:21.855>have <00:25:22.030>tests <00:25:22.205>and <00:25:22.380>everything <00:25:22.555>is <00:25:22.730>working, <00:25:22.905>um,

528
00:25:24.305 --> 00:25:27.725
<00:25:24.305>and <00:25:24.480>everything <00:25:24.655>is <00:25:24.830>fine, <00:25:25.005>but <00:25:25.180>things <00:25:25.355>are <00:25:25.530>only <00:25:25.705>working

529
00:25:28.035 --> 00:25:30.365
<00:25:28.035>because <00:25:28.268>of <00:25:28.501>the <00:25:28.735>way <00:25:28.968>your <00:25:29.201>mock <00:25:29.435>works,

530
00:25:30.365 --> 00:25:32.725
<00:25:30.365>because <00:25:30.565>no <00:25:30.765>one <00:25:30.965>is <00:25:31.165>ever <00:25:31.365>going <00:25:31.565>to <00:25:31.765>verify

531
00:25:33.035 --> 00:25:36.765
<00:25:33.035>that <00:25:33.235>the <00:25:33.435>mock <00:25:33.635>behaves <00:25:33.835>identical <00:25:34.035>to <00:25:34.235>your <00:25:34.435>database.

532
00:25:37.305 --> 00:25:40.045
<00:25:37.305>And <00:25:37.480>even <00:25:37.655>if <00:25:37.830>you <00:25:38.005>put <00:25:38.180>this <00:25:38.355>effort <00:25:38.530>into <00:25:38.705>it,

533
00:25:40.045 --> 00:25:44.205
<00:25:40.045>and <00:25:40.172>even <00:25:40.299>if <00:25:40.426>you <00:25:40.554>verify <00:25:40.681>this, <00:25:40.808>you <00:25:40.935>will, <00:25:41.063>you, <00:25:41.190>you <00:25:41.317>won't <00:25:41.445>do

534
00:25:44.205 --> 00:25:47.445
<00:25:44.205>that <00:25:44.379>every <00:25:44.554>time <00:25:44.730>your <00:25:44.905>database <00:25:45.080>driver <00:25:45.254>gets <00:25:45.429>an <00:25:45.605>update.

535
00:25:47.585 --> 00:25:51.285
<00:25:47.585>And <00:25:47.725>every <00:25:47.865>single <00:25:48.005>time <00:25:48.145>this <00:25:48.285>happens, <00:25:48.425>you <00:25:48.565>would <00:25:48.705>need <00:25:48.845>to <00:25:48.985>verify

536
00:25:51.285 --> 00:25:53.045
<00:25:51.285>that <00:25:51.635>the <00:25:51.985>mock <00:25:52.335>still <00:25:52.685>works.

537
00:25:53.195 --> 00:25:54.205
<00:25:53.195>Like <00:25:53.649>the <00:25:54.103>original,

538
00:25:54.225 --> 00:25:58.605
<00:25:54.225>and <00:25:54.352>this <00:25:54.479>is <00:25:54.606>even <00:25:54.734>worse <00:25:54.861>than <00:25:54.988>having <00:25:55.115>no <00:25:55.243>test, <00:25:55.370>is <00:25:55.497>having <00:25:55.625>tests

539
00:25:58.675 --> 00:25:59.925
<00:25:58.675>that <00:25:59.237>look <00:25:59.800>green,

540
00:26:00.185 --> 00:26:03.845
<00:26:00.185>but <00:26:00.385>actually <00:26:00.585>don't <00:26:00.784>test <00:26:00.985>anything <00:26:01.185>except <00:26:01.385>your <00:26:01.585>simulation.

541
00:26:04.225 --> 00:26:06.885
<00:26:04.225>And <00:26:04.365>this <00:26:04.504>is <00:26:04.645>something <00:26:04.784>you <00:26:04.925>have <00:26:05.064>to <00:26:05.205>be <00:26:05.344>very, <00:26:05.485>very <00:26:05.625>careful.

542
00:26:07.585 --> 00:26:11.535
<00:26:07.585>And <00:26:07.740>so <00:26:07.896>to <00:26:08.051>cut <00:26:08.207>it <00:26:08.362>short, <00:26:08.518>I <00:26:08.673>would, <00:26:08.829>I <00:26:08.985>personally,

543
00:26:11.855 --> 00:26:13.695
<00:26:11.855>I <00:26:12.321>am <00:26:12.788>always <00:26:13.255>very,

544
00:26:13.765 --> 00:26:17.015
<00:26:13.765>very <00:26:13.965>cautious <00:26:14.165>on <00:26:14.365>doing <00:26:14.565>any <00:26:14.765>mocking <00:26:14.965>at <00:26:15.165>all

545
00:26:17.015 --> 00:26:21.855
<00:26:17.015>because, <00:26:17.155>uh, <00:26:17.295>mocking <00:26:17.435>too <00:26:17.575>often <00:26:17.715>leads <00:26:17.855>to <00:26:17.995>a <00:26:18.135>false <00:26:18.275>good <00:26:18.415>feeling

546
00:26:22.075 --> 00:26:25.295
<00:26:22.075>of <00:26:22.308>safety <00:26:22.541>that <00:26:22.775>is <00:26:23.008>not <00:26:23.241>really <00:26:23.475>reasoned.

547
00:26:25.875 --> 00:26:28.375
<00:26:25.875>And, <00:26:26.030>uh, <00:26:26.186>there, <00:26:26.341>uh, <00:26:26.497>you <00:26:26.652>should <00:26:26.808>be <00:26:26.963>very, <00:26:27.119>very <00:26:27.275>careful.

548
00:26:28.475 --> 00:26:30.735
<00:26:28.475>So <00:26:28.708>don't <00:26:28.941>make <00:26:29.175>mistake <00:26:29.408>number <00:26:29.641>four, <00:26:29.875>try

549
00:26:30.735 --> 00:26:32.575
<00:26:30.735>to <00:26:31.084>avoid <00:26:31.435>too <00:26:31.784>much <00:26:32.135>mocking.

550
00:26:32.955 --> 00:26:36.095
<00:26:32.955>Uh, <00:26:33.082>so, <00:26:33.209>so <00:26:33.336>the <00:26:33.464>mistake <00:26:33.591>is <00:26:33.718>do <00:26:33.845>too <00:26:33.973>much <00:26:34.100>mocking, <00:26:34.227>so <00:26:34.355>try

551
00:26:36.095 --> 00:26:37.495
<00:26:36.095>to <00:26:36.410>avoid <00:26:36.725>too <00:26:37.040>much <00:26:37.355>mocking

552
00:26:37.875 --> 00:26:42.015
<00:26:37.875>and, <00:26:38.015>uh, <00:26:38.155>try <00:26:38.295>to <00:26:38.435>move <00:26:38.575>things <00:26:38.715>as <00:26:38.855>far <00:26:38.995>to <00:26:39.135>the <00:26:39.275>outside

553
00:26:42.035 --> 00:26:45.005
<00:26:42.035>of <00:26:42.210>your <00:26:42.385>software <00:26:42.560>and <00:26:42.735>focus <00:26:42.910>on <00:26:43.085>testing <00:26:43.260>the <00:26:43.435>internal

554
00:26:45.235 --> 00:26:46.725
<00:26:45.235>core <00:26:45.681>of <00:26:46.129>your <00:26:46.576>software.

555
00:26:46.785 --> 00:26:49.565
<00:26:46.785>And, <00:26:46.960>and <00:26:47.135>this <00:26:47.310>internal <00:26:47.485>core, <00:26:47.660>this <00:26:47.835>should <00:26:48.010>be <00:26:48.185>primarily

556
00:26:50.245 --> 00:26:52.365
<00:26:50.245>composed <00:26:50.478>of <00:26:50.711>pure <00:26:50.945>functions <00:26:51.178>of <00:26:51.411>STA <00:26:51.645>things,

557
00:26:52.435 --> 00:26:55.165
<00:26:52.435>because <00:26:52.590>these, <00:26:52.746>this <00:26:52.901>is <00:26:53.057>what <00:26:53.212>makes <00:26:53.368>it <00:26:53.523>easy <00:26:53.679>to <00:26:53.835>test.

558
00:26:55.185 --> 00:26:57.405
<00:26:55.185>And <00:26:55.385>then <00:26:55.585>yes, <00:26:55.784>you <00:26:55.985>will <00:26:56.185>have <00:26:56.385>a <00:26:56.585>small

559
00:26:58.245 --> 00:27:02.005
<00:26:58.245>boundary <00:26:58.385>area <00:26:58.524>across <00:26:58.665>your <00:26:58.804>core <00:26:58.945>that <00:26:59.084>is <00:26:59.225>maybe <00:26:59.364>not <00:26:59.504>that <00:26:59.645>easy

560
00:27:02.025 --> 00:27:03.725
<00:27:02.025>to <00:27:02.225>test <00:27:02.425>or <00:27:02.625>that <00:27:02.825>won't <00:27:03.025>have <00:27:03.225>any <00:27:03.425>tests,

561
00:27:03.785 --> 00:27:05.925
<00:27:03.785>but <00:27:03.960>this <00:27:04.135>is, <00:27:04.310>if, <00:27:04.485>if <00:27:04.660>this <00:27:04.835>is <00:27:05.010>only <00:27:05.185>2%

562
00:27:06.185 --> 00:27:08.285
<00:27:06.185>of <00:27:06.360>your <00:27:06.534>entire <00:27:06.710>code <00:27:06.885>base, <00:27:07.060>then <00:27:07.235>this <00:27:07.409>is <00:27:07.585>okay.

563
00:27:08.405 --> 00:27:11.285
<00:27:08.405>I <00:27:08.754>think <00:27:09.105>another <00:27:09.455>option <00:27:09.805>is

564
00:27:11.465 --> 00:27:15.285
<00:27:11.465>to <00:27:11.639>test <00:27:11.814>your <00:27:11.990>mocks <00:27:12.165>against <00:27:12.340>the <00:27:12.514>real <00:27:12.689>world <00:27:12.865>implementation.

565
00:27:15.425 --> 00:27:19.325
<00:27:15.425>So, <00:27:15.565>uh, <00:27:15.705>of <00:27:15.845>course, <00:27:15.985>uh, <00:27:16.125>this <00:27:16.264>then <00:27:16.405>means <00:27:16.544>that <00:27:16.685>you <00:27:16.825>need

566
00:27:19.325 --> 00:27:21.005
<00:27:19.325>to <00:27:19.605>write <00:27:19.885>tests <00:27:20.165>for <00:27:20.445>your <00:27:20.725>tests.

567
00:27:21.265 --> 00:27:25.085
<00:27:21.265>And, <00:27:21.405>uh, <00:27:21.545>actually <00:27:21.685>if <00:27:21.825>you, <00:27:21.965>uh, <00:27:22.105>you <00:27:22.245>can <00:27:22.385>do <00:27:22.525>this, <00:27:22.665>uh,

568
00:27:25.115 --> 00:27:27.125
<00:27:25.115>with <00:27:25.395>a <00:27:25.675>reasonable <00:27:25.955>effort, <00:27:26.235>if <00:27:26.515>example,

569
00:27:27.125 --> 00:27:30.845
<00:27:27.125>given <00:27:27.280>you <00:27:27.436>write <00:27:27.591>your <00:27:27.747>own <00:27:27.902>drivers <00:27:28.058>for <00:27:28.213>a <00:27:28.369>database, <00:27:28.525>then

570
00:27:30.865 --> 00:27:33.845
<00:27:30.865>of <00:27:31.020>course <00:27:31.176>you <00:27:31.331>can, <00:27:31.487>in <00:27:31.642>addition <00:27:31.798>to <00:27:31.953>the <00:27:32.109>existing <00:27:32.265>driver,

571
00:27:33.985 --> 00:27:37.285
<00:27:33.985>simply <00:27:34.140>add <00:27:34.296>an <00:27:34.451>in-memory <00:27:34.607>version <00:27:34.762>of <00:27:34.918>that <00:27:35.073>driver <00:27:35.229>example <00:27:35.385>given

572
00:27:37.745 --> 00:27:41.485
<00:27:37.745>and <00:27:37.885>let <00:27:38.024>both <00:27:38.165>of <00:27:38.304>them, <00:27:38.445>uh, <00:27:38.584>run <00:27:38.725>against <00:27:38.864>the <00:27:39.004>same <00:27:39.145>tests.

573
00:27:41.545 --> 00:27:44.125
<00:27:41.545>And <00:27:41.685>then <00:27:41.825>they, <00:27:41.965>you <00:27:42.105>can <00:27:42.245>be <00:27:42.385>sure <00:27:42.525>that <00:27:42.665>things <00:27:42.805>are <00:27:42.945>working

574
00:27:44.185 --> 00:27:46.805
<00:27:44.185>as <00:27:44.325>expected, <00:27:44.465>and <00:27:44.605>then <00:27:44.745>you're <00:27:44.885>mocked <00:27:45.024>as, <00:27:45.165>uh, <00:27:45.304>the <00:27:45.445>right <00:27:45.585>thing.

575
00:27:47.305 --> 00:27:50.005
<00:27:47.305>And <00:27:47.538>whenever <00:27:47.771>the <00:27:48.005>database <00:27:48.238>behavior <00:27:48.471>changes, <00:27:48.705>uh,

576
00:27:50.105 --> 00:27:52.005
<00:27:50.105>and <00:27:50.338>you <00:27:50.571>adjust <00:27:50.805>the <00:27:51.038>tests, <00:27:51.271>uh, <00:27:51.505>it,

577
00:27:52.225 --> 00:27:53.805
<00:27:52.225>it <00:27:52.504>possibly <00:27:52.784>will <00:27:53.064>fail <00:27:53.344>your <00:27:53.625>mock,

578
00:27:54.025 --> 00:27:56.205
<00:27:54.025>and <00:27:54.225>then <00:27:54.425>you <00:27:54.625>can <00:27:54.825>use <00:27:55.025>the <00:27:55.225>in-memory <00:27:55.425>version

579
00:27:56.345 --> 00:27:59.005
<00:27:56.345>of <00:27:56.625>your <00:27:56.905>driver <00:27:57.185>in <00:27:57.465>everywhere <00:27:57.745>else.

580
00:27:59.145 --> 00:28:02.605
<00:27:59.145>But <00:27:59.300>you <00:27:59.456>need <00:27:59.611>to <00:27:59.767>ensure <00:27:59.922>that, <00:28:00.078>uh, <00:28:00.233>this <00:28:00.389>mark <00:28:00.545>does

581
00:28:02.635 --> 00:28:04.645
<00:28:02.635>what <00:28:02.915>you <00:28:03.195>would <00:28:03.475>like <00:28:03.754>to <00:28:04.035>do.

582
00:28:05.065 --> 00:28:06.485
<00:28:05.065>Um, <00:28:05.384>and <00:28:05.704>this <00:28:06.023>is <00:28:06.342>easier.

583
00:28:07.205 --> 00:28:10.005
<00:28:07.205>I, <00:28:07.312>I, <00:28:07.420>I <00:28:07.528>don't <00:28:07.635>want <00:28:07.743>to <00:28:07.851>say <00:28:07.958>this <00:28:08.066>is <00:28:08.174>easy, <00:28:08.281>but <00:28:08.389>at <00:28:08.497>least <00:28:08.605>easier.

584
00:28:10.685 --> 00:28:12.845
<00:28:10.685>I <00:28:10.885>think <00:28:11.085>if <00:28:11.284>you're <00:28:11.485>writing <00:28:11.685>your <00:28:11.885>own <00:28:12.085>connectors

585
00:28:12.845 --> 00:28:16.485
<00:28:12.845>and <00:28:13.000>adapters <00:28:13.156>to <00:28:13.311>external <00:28:13.467>systems, <00:28:13.622>it's <00:28:13.778>harder <00:28:13.933>if <00:28:14.089>you <00:28:14.245>need

586
00:28:16.505 --> 00:28:19.965
<00:28:16.505>to, <00:28:16.680>uh, <00:28:16.855>provide <00:28:17.030>a <00:28:17.205>mock <00:28:17.380>for <00:28:17.555>a <00:28:17.730>predefined <00:28:17.905>adapter.

587
00:28:20.815 --> 00:28:24.475
<00:28:20.815>Um, <00:28:20.990>however, <00:28:21.165>if <00:28:21.340>we're <00:28:21.515>now <00:28:21.690>talking <00:28:21.865>about <00:28:22.040>testing <00:28:22.215>code

588
00:28:24.475 --> 00:28:25.795
<00:28:24.475>that <00:28:25.069>addresses <00:28:25.663>databases

589
00:28:25.815 --> 00:28:29.155
<00:28:25.815>or <00:28:25.990>other <00:28:26.165>external <00:28:26.340>systems <00:28:26.515>such <00:28:26.690>as <00:28:26.865>message <00:28:27.040>queues, <00:28:27.215>whatever,

590
00:28:29.615 --> 00:28:32.875
<00:28:29.615>you <00:28:29.755>need <00:28:29.895>to <00:28:30.035>set <00:28:30.175>up <00:28:30.315>the <00:28:30.455>infrastructure <00:28:30.595>for <00:28:30.735>the <00:28:30.875>test <00:28:31.015>somehow.

591
00:28:33.055 --> 00:28:36.155
<00:28:33.055>And <00:28:33.195>what <00:28:33.335>you <00:28:33.475>don't <00:28:33.615>want <00:28:33.755>to <00:28:33.895>have <00:28:34.035>is <00:28:34.175>you <00:28:34.315>don't <00:28:34.455>want

592
00:28:36.155 --> 00:28:38.475
<00:28:36.155>to <00:28:36.504>have <00:28:36.855>some <00:28:37.205>predefined <00:28:37.555>infrastructure

593
00:28:38.865 --> 00:28:40.275
<00:28:38.865>that <00:28:39.182>stays <00:28:39.499>the <00:28:39.816>same <00:28:40.134>forever.

594
00:28:40.695 --> 00:28:43.595
<00:28:40.695>And, <00:28:40.835>uh, <00:28:40.975>you, <00:28:41.115>you <00:28:41.254>basically <00:28:41.395>want <00:28:41.534>to <00:28:41.675>have <00:28:41.814>a <00:28:41.955>fresh <00:28:42.095>setup

595
00:28:43.655 --> 00:28:47.475
<00:28:43.655>of <00:28:43.782>this <00:28:43.909>infrastructure <00:28:44.036>for <00:28:44.164>each <00:28:44.291>run <00:28:44.418>of <00:28:44.545>your <00:28:44.673>tests <00:28:44.800>to <00:28:44.927>be <00:28:45.055>sure

596
00:28:47.745 --> 00:28:50.795
<00:28:47.745>that <00:28:47.900>the <00:28:48.056>tests <00:28:48.211>actually <00:28:48.367>always <00:28:48.522>start <00:28:48.678>from <00:28:48.833>scratch <00:28:48.989>at <00:28:49.145>the

597
00:28:50.795 --> 00:28:53.555
<00:28:50.795>same, <00:28:51.075>uh, <00:28:51.355>at <00:28:51.635>the <00:28:51.915>same <00:28:52.195>situation.

598
00:28:53.935 --> 00:28:55.195
<00:28:53.935>So <00:28:54.161>this <00:28:54.388>means <00:28:54.615>that <00:28:54.842>you <00:28:55.069>need

599
00:28:55.195 --> 00:28:57.675
<00:28:55.195>to <00:28:55.475>reset <00:28:55.754>your <00:28:56.034>infrastructure <00:28:56.314>every <00:28:56.595>time.

600
00:28:57.815 --> 00:29:02.115
<00:28:57.815>And, <00:28:57.942>uh, <00:28:58.069>yeah, <00:28:58.196>a <00:28:58.324>very, <00:28:58.451>a <00:28:58.578>very <00:28:58.705>extreme <00:28:58.833>approach <00:28:58.960>here <00:28:59.087>would <00:28:59.215>be

601
00:29:02.115 --> 00:29:04.515
<00:29:02.115>to <00:29:02.315>reset <00:29:02.515>the <00:29:02.715>infrastructure <00:29:02.915>after <00:29:03.115>each <00:29:03.315>single <00:29:03.515>test.

602
00:29:05.135 --> 00:29:07.475
<00:29:05.135>You <00:29:05.275>probably <00:29:05.415>won't <00:29:05.555>do <00:29:05.695>this <00:29:05.835>because <00:29:05.975>this <00:29:06.115>takes <00:29:06.254>too <00:29:06.395>much <00:29:06.535>time,

603
00:29:07.975 --> 00:29:11.875
<00:29:07.975>but <00:29:08.130>you, <00:29:08.286>uh, <00:29:08.441>uh, <00:29:08.597>probably <00:29:08.752>want <00:29:08.908>to <00:29:09.063>use <00:29:09.219>something <00:29:09.375>such

604
00:29:11.875 --> 00:29:14.515
<00:29:11.875>as <00:29:12.108>Docker, <00:29:12.341>such <00:29:12.575>as <00:29:12.808>Kubernetes <00:29:13.041>to, <00:29:13.275>um,

605
00:29:15.195 --> 00:29:17.195
<00:29:15.195>automate <00:29:15.428>things <00:29:15.661>like <00:29:15.895>provide <00:29:16.128>me <00:29:16.361>a <00:29:16.595>database,

606
00:29:17.195 --> 00:29:19.075
<00:29:17.195>provide <00:29:17.370>me <00:29:17.544>a <00:29:17.720>message <00:29:17.895>queue <00:29:18.070>and <00:29:18.245>things <00:29:18.419>like <00:29:18.595>that.

607
00:29:19.375 --> 00:29:21.635
<00:29:19.375>And <00:29:19.608>then <00:29:19.841>before <00:29:20.075>running <00:29:20.308>your <00:29:20.541>tests, <00:29:20.775>uh,

608
00:29:21.635 --> 00:29:24.875
<00:29:21.635>setting <00:29:21.790>up <00:29:21.946>such <00:29:22.101>an <00:29:22.257>infrastructure, <00:29:22.412>um, <00:29:22.568>building <00:29:22.723>it <00:29:22.879>up, <00:29:23.035>um,

609
00:29:24.875 --> 00:29:27.155
<00:29:24.875>running <00:29:25.050>your <00:29:25.225>tests <00:29:25.400>and <00:29:25.575>then <00:29:25.750>tearing <00:29:25.925>it <00:29:26.100>down <00:29:26.275>again.

610
00:29:27.155 --> 00:29:29.875
<00:29:27.155>And, <00:29:27.310>uh, <00:29:27.466>if <00:29:27.621>you, <00:29:27.777>if <00:29:27.932>you're <00:29:28.088>doing <00:29:28.243>this <00:29:28.399>using <00:29:28.555>containers,

611
00:29:29.875 --> 00:29:31.795
<00:29:29.875>if <00:29:30.155>you're <00:29:30.435>doing <00:29:30.715>this <00:29:30.995>using <00:29:31.275>Kubernetes,

612
00:29:32.055 --> 00:29:34.955
<00:29:32.055>you <00:29:32.195>can <00:29:32.335>even <00:29:32.475>do <00:29:32.615>this <00:29:32.755>per <00:29:32.895>pool <00:29:33.035>request, <00:29:33.175>per <00:29:33.315>match <00:29:33.455>request.

613
00:29:35.495 --> 00:29:39.075
<00:29:35.495>So, <00:29:35.635>uh, <00:29:35.774>that <00:29:35.915>you <00:29:36.054>don't, <00:29:36.195>that <00:29:36.334>that <00:29:36.475>you <00:29:36.614>aren't <00:29:36.754>limited <00:29:36.895>by.

614
00:29:39.255 --> 00:29:41.405
<00:29:39.255>Oh, <00:29:39.488>we <00:29:39.721>only <00:29:39.955>have <00:29:40.188>three <00:29:40.421>tests <00:29:40.655>scenarios

615
00:29:41.705 --> 00:29:43.725
<00:29:41.705>and <00:29:42.054>automate <00:29:42.405>your <00:29:42.754>entire <00:29:43.105>infrastructure.

616
00:29:45.305 --> 00:29:49.765
<00:29:45.305>Um, <00:29:45.432>so <00:29:45.559>this <00:29:45.686>is <00:29:45.814>thing <00:29:45.941>number <00:29:46.068>five <00:29:46.195>that <00:29:46.323>you <00:29:46.450>should, <00:29:46.577>uh, <00:29:46.705>try

617
00:29:49.765 --> 00:29:51.645
<00:29:49.765>to <00:29:49.965>avoid, <00:29:50.165>or <00:29:50.365>this <00:29:50.565>is <00:29:50.765>mistake <00:29:50.965>number <00:29:51.165>five.

618
00:29:52.225 --> 00:29:55.325
<00:29:52.225>Um, <00:29:52.504>avoid <00:29:52.784>tests <00:29:53.064>that <00:29:53.344>only <00:29:53.625>work

619
00:29:55.435 --> 00:29:59.245
<00:29:55.435>because <00:29:55.610>some <00:29:55.784>other <00:29:55.960>tests <00:29:56.135>have <00:29:56.310>been <00:29:56.485>run <00:29:56.659>before, <00:29:56.835>or

620
00:29:59.485 --> 00:30:02.565
<00:29:59.485>because <00:29:59.659>some <00:29:59.834>infrastructure <00:30:00.010>has <00:30:00.185>been <00:30:00.360>left <00:30:00.534>in <00:30:00.709>a <00:30:00.885>specific

621
00:30:02.565 --> 00:30:05.325
<00:30:02.565>state <00:30:02.845>from <00:30:03.125>previous <00:30:03.405>tests, <00:30:03.685>always <00:30:03.965>start

622
00:30:05.845 --> 00:30:08.925
<00:30:05.845>independently <00:30:06.078>from <00:30:06.311>scratch, <00:30:06.545>always <00:30:06.778>start <00:30:07.011>from <00:30:07.245>zero

623
00:30:09.025 --> 00:30:11.725
<00:30:09.025>and <00:30:09.258>always <00:30:09.491>make <00:30:09.725>sure <00:30:09.958>that, <00:30:10.191>uh, <00:30:10.425>you,

624
00:30:11.785 --> 00:30:14.405
<00:30:11.785>you <00:30:11.960>build <00:30:12.135>everything <00:30:12.310>up <00:30:12.485>from <00:30:12.660>scratch <00:30:12.835>for <00:30:13.010>every <00:30:13.185>run

625
00:30:14.405 --> 00:30:17.285
<00:30:14.405>of <00:30:14.560>your <00:30:14.716>tests <00:30:14.871>so <00:30:15.027>that <00:30:15.182>these <00:30:15.338>tests <00:30:15.493>are <00:30:15.649>really, <00:30:15.805>really

626
00:30:17.835 --> 00:30:19.085
<00:30:17.835>independent <00:30:18.210>of <00:30:18.585>each <00:30:18.960>other

627
00:30:19.345 --> 00:30:21.845
<00:30:19.345>and <00:30:19.625>ensure <00:30:19.905>that <00:30:20.185>the <00:30:20.465>order <00:30:20.745>in

628
00:30:21.845 --> 00:30:24.845
<00:30:21.845>that <00:30:22.045>your <00:30:22.245>tests <00:30:22.445>run <00:30:22.645>doesn't <00:30:22.845>make <00:30:23.045>any, <00:30:23.245>um,

629
00:30:24.845 --> 00:30:26.085
<00:30:24.845>doesn't <00:30:25.217>make <00:30:25.589>any <00:30:25.961>difference.

630
00:30:26.425 --> 00:30:29.965
<00:30:26.425>So <00:30:26.580>that <00:30:26.736>test <00:30:26.891>number <00:30:27.047>15 <00:30:27.202>does <00:30:27.358>not <00:30:27.513>only <00:30:27.669>run <00:30:27.825>accidentally

631
00:30:30.065 --> 00:30:33.285
<00:30:30.065>and <00:30:30.240>pass <00:30:30.415>because <00:30:30.590>test <00:30:30.765>number <00:30:30.940>14 <00:30:31.115>has <00:30:31.290>run <00:30:31.465>before,

632
00:30:34.065 --> 00:30:35.205
<00:30:34.065>and <00:30:34.407>this <00:30:34.749>is <00:30:35.091>important.

633
00:30:35.225 --> 00:30:38.645
<00:30:35.225>And <00:30:35.399>so, <00:30:35.574>uh, <00:30:35.750>this <00:30:35.925>is <00:30:36.100>a, <00:30:36.274>um, <00:30:36.449>a <00:30:36.625>thing

634
00:30:38.645 --> 00:30:40.645
<00:30:38.645>to <00:30:38.800>watch <00:30:38.956>out <00:30:39.111>if <00:30:39.267>you <00:30:39.422>are <00:30:39.578>working <00:30:39.733>with <00:30:39.889>test <00:30:40.045>runners.

635
00:30:40.955 --> 00:30:44.565
<00:30:40.955>Some <00:30:41.095>of <00:30:41.235>them <00:30:41.375>are <00:30:41.514>able <00:30:41.655>to, <00:30:41.794>uh, <00:30:41.935>randomize <00:30:42.074>the <00:30:42.215>execution <00:30:42.355>order,

636
00:30:44.905 --> 00:30:47.405
<00:30:44.905>and <00:30:45.080>this <00:30:45.254>is <00:30:45.430>actually <00:30:45.605>a <00:30:45.780>very, <00:30:45.955>very <00:30:46.129>good <00:30:46.305>thing.

637
00:30:48.745 --> 00:30:50.325
<00:30:48.745>Now <00:30:49.094>once <00:30:49.445>you've <00:30:49.794>grabbed <00:30:50.145>this.

638
00:30:50.345 --> 00:30:53.045
<00:30:50.345>So <00:30:50.500>now <00:30:50.656>we've <00:30:50.811>got <00:30:50.967>unit <00:30:51.122>tests, <00:30:51.278>we've <00:30:51.433>got <00:30:51.589>integration <00:30:51.745>tests,

639
00:30:53.045 --> 00:30:56.765
<00:30:53.045>which <00:30:53.245>also, <00:30:53.445>uh, <00:30:53.645>focus <00:30:53.845>on, <00:30:54.045>uh, <00:30:54.245>infrastructure <00:30:54.445>things.

640
00:30:57.105 --> 00:30:58.245
<00:30:57.105>Uh, <00:30:57.361>there's <00:30:57.618>the <00:30:57.874>next <00:30:58.130>level,

641
00:30:58.305 --> 00:31:00.165
<00:30:58.305>and <00:30:58.505>this <00:30:58.705>is, <00:30:58.905>uh, <00:30:59.105>anything <00:30:59.305>that <00:30:59.505>is <00:30:59.705>related

642
00:31:00.225 --> 00:31:01.805
<00:31:00.225>to <00:31:00.691>component <00:31:01.158>UI <00:31:01.625>testing.

643
00:31:02.585 --> 00:31:04.685
<00:31:02.585>And <00:31:02.760>I <00:31:02.935>would <00:31:03.110>like <00:31:03.285>to <00:31:03.460>separate <00:31:03.635>these <00:31:03.810>two <00:31:03.985>terms.

644
00:31:04.715 --> 00:31:08.165
<00:31:04.715>Component <00:31:04.915>testing <00:31:05.115>to <00:31:05.314>me <00:31:05.514>is <00:31:05.715>testing <00:31:05.915>UI <00:31:06.115>components,

645
00:31:08.305 --> 00:31:11.725
<00:31:08.305>but <00:31:08.460>more, <00:31:08.616>uh, <00:31:08.771>the <00:31:08.927>UI <00:31:09.082>logic <00:31:09.238>in <00:31:09.393>inside <00:31:09.549>of <00:31:09.705>them,

646
00:31:12.185 --> 00:31:15.045
<00:31:12.185>not <00:31:12.385>actually <00:31:12.585>testing <00:31:12.784>the <00:31:12.985>actual <00:31:13.185>ui, <00:31:13.385>the <00:31:13.585>looks

647
00:31:15.425 --> 00:31:17.925
<00:31:15.425>of <00:31:15.600>the <00:31:15.774>things <00:31:15.950>those, <00:31:16.125>so <00:31:16.300>this <00:31:16.475>is <00:31:16.649>typically <00:31:16.825>something

648
00:31:17.925 --> 00:31:19.405
<00:31:17.925>that <00:31:18.147>you <00:31:18.369>can <00:31:18.591>do <00:31:18.812>without <00:31:19.034>a <00:31:19.257>browser.

649
00:31:20.025 --> 00:31:21.885
<00:31:20.025>Um, <00:31:20.258>and <00:31:20.491>this <00:31:20.725>should <00:31:20.958>be <00:31:21.191>more <00:31:21.425>simple,

650
00:31:22.075 --> 00:31:24.645
<00:31:22.075>more <00:31:22.355>easy <00:31:22.635>than <00:31:22.915>actually <00:31:23.195>automating <00:31:23.475>browsers.

651
00:31:24.935 --> 00:31:26.405
<00:31:24.935>There <00:31:25.265>are <00:31:25.596>libraries <00:31:25.927>for <00:31:26.258>this.

652
00:31:26.545 --> 00:31:28.605
<00:31:26.545>Um, <00:31:26.895>I'm <00:31:27.245>coming <00:31:27.595>from, <00:31:27.945>uh,

653
00:31:28.605 --> 00:31:31.085
<00:31:28.605>the <00:31:28.838>JavaScript <00:31:29.071>from <00:31:29.305>the <00:31:29.538>TypeScript <00:31:29.771>world, <00:31:30.005>uh,

654
00:31:31.085 --> 00:31:33.805
<00:31:31.085>and <00:31:31.212>I'm <00:31:31.339>doing <00:31:31.466>a <00:31:31.594>lot <00:31:31.721>of, <00:31:31.848>uh, <00:31:31.975>react <00:31:32.103>in <00:31:32.230>the <00:31:32.357>front <00:31:32.485>end.

655
00:31:33.825 --> 00:31:36.445
<00:31:33.825>So <00:31:34.000>there's <00:31:34.175>example <00:31:34.350>given <00:31:34.525>the <00:31:34.700>React, <00:31:34.875>uh, <00:31:35.050>testing <00:31:35.225>library,

656
00:31:36.815 --> 00:31:39.485
<00:31:36.815>which <00:31:36.990>is <00:31:37.165>able <00:31:37.340>to <00:31:37.515>do <00:31:37.690>something, <00:31:37.865>uh, <00:31:38.040>like <00:31:38.215>that.

657
00:31:39.705 --> 00:31:43.605
<00:31:39.705>Um, <00:31:39.879>but <00:31:40.054>uh, <00:31:40.230>yeah, <00:31:40.405>there <00:31:40.580>are <00:31:40.754>libraries <00:31:40.929>like <00:31:41.105>that

658
00:31:43.605 --> 00:31:45.725
<00:31:43.605>for <00:31:43.885>other <00:31:44.165>UI <00:31:44.445>frameworks <00:31:44.725>as <00:31:45.005>well.

659
00:31:45.865 --> 00:31:47.085
<00:31:45.865>So, <00:31:46.231>um, <00:31:46.597>yeah, <00:31:46.963>it,

660
00:31:47.085 --> 00:31:49.085
<00:31:47.085>it <00:31:47.260>shouldn't <00:31:47.435>make <00:31:47.610>any <00:31:47.785>difference <00:31:47.960>if <00:31:48.135>you're <00:31:48.310>using <00:31:48.485>React

661
00:31:49.085 --> 00:31:50.605
<00:31:49.085>or <00:31:49.358>Angular <00:31:49.632>or <00:31:49.905>View <00:31:50.179>or <00:31:50.453>whatever.

662
00:31:51.145 --> 00:31:54.685
<00:31:51.145>Uh, <00:31:51.272>the <00:31:51.399>point <00:31:51.526>here <00:31:51.654>is <00:31:51.781>your <00:31:51.908>first <00:31:52.035>focus <00:31:52.163>should <00:31:52.290>be <00:31:52.417>on <00:31:52.545>testing

663
00:31:54.745 --> 00:31:57.245
<00:31:54.745>single <00:31:55.024>components, <00:31:55.304>not <00:31:55.584>the <00:31:55.864>entire <00:31:56.145>ui.

664
00:31:57.665 --> 00:31:59.565
<00:31:57.665>And <00:31:57.898>this <00:31:58.131>is <00:31:58.365>basically <00:31:58.598>the <00:31:58.831>same <00:31:59.065>distinction

665
00:31:59.565 --> 00:32:03.445
<00:31:59.565>between <00:31:59.720>component <00:31:59.876>tests <00:32:00.031>and <00:32:00.187>UI <00:32:00.342>tests <00:32:00.498>as <00:32:00.653>between <00:32:00.809>unit <00:32:00.965>tests

666
00:32:03.465 --> 00:32:04.485
<00:32:03.465>and <00:32:03.924>integration <00:32:04.382>tests.

667
00:32:04.585 --> 00:32:06.845
<00:32:04.585>So <00:32:04.785>let's <00:32:04.985>first <00:32:05.185>focus <00:32:05.385>on <00:32:05.585>the <00:32:05.785>building <00:32:05.985>blocks

668
00:32:06.845 --> 00:32:08.485
<00:32:06.845>and <00:32:07.125>this <00:32:07.405>case, <00:32:07.685>the <00:32:07.965>UI <00:32:08.245>components,

669
00:32:08.825 --> 00:32:11.325
<00:32:08.825>and <00:32:09.025>then <00:32:09.225>let's <00:32:09.425>move <00:32:09.625>to <00:32:09.825>the <00:32:10.025>large <00:32:10.225>ui.

670
00:32:11.325 --> 00:32:12.445
<00:32:11.325>And <00:32:11.526>one <00:32:11.728>thing <00:32:11.929>that <00:32:12.131>you <00:32:12.332>have

671
00:32:12.445 --> 00:32:14.125
<00:32:12.445>to <00:32:12.678>keep <00:32:12.911>in <00:32:13.145>mind <00:32:13.378>when <00:32:13.611>testing <00:32:13.845>components

672
00:32:14.185 --> 00:32:16.125
<00:32:14.185>or <00:32:14.465>when <00:32:14.745>testing <00:32:15.024>UI <00:32:15.304>in <00:32:15.585>general,

673
00:32:16.185 --> 00:32:19.565
<00:32:16.185>and <00:32:16.360>this <00:32:16.534>is <00:32:16.710>mistake <00:32:16.885>number <00:32:17.060>six, <00:32:17.235>is, <00:32:17.409>um, <00:32:17.585>assuming

674
00:32:19.715 --> 00:32:24.285
<00:32:19.715>that <00:32:19.915>UI <00:32:20.115>is <00:32:20.314>synchronous, <00:32:20.514>it <00:32:20.715>won't <00:32:20.915>probably <00:32:21.115>be

675
00:32:24.395 --> 00:32:27.645
<00:32:24.395>because <00:32:24.550>there <00:32:24.706>are <00:32:24.861>so <00:32:25.017>many <00:32:25.172>reasons <00:32:25.328>why <00:32:25.483>UI <00:32:25.639>can <00:32:25.795>be

676
00:32:27.685 --> 00:32:31.245
<00:32:27.685>asynchronous, <00:32:28.034>like <00:32:28.385>transitions, <00:32:28.735>animated <00:32:29.085>transitions.

677
00:32:31.305 --> 00:32:34.205
<00:32:31.305>So <00:32:31.480>don't <00:32:31.655>think, <00:32:31.830>oh, <00:32:32.005>well, <00:32:32.180>there's <00:32:32.355>an <00:32:32.530>input <00:32:32.705>box,

678
00:32:34.405 --> 00:32:37.365
<00:32:34.405>I <00:32:34.560>type <00:32:34.716>in <00:32:34.871>something, <00:32:35.027>hit <00:32:35.182>sub, <00:32:35.338>hit <00:32:35.493>the <00:32:35.649>submit <00:32:35.805>button,

679
00:32:37.865 --> 00:32:41.445
<00:32:37.865>and <00:32:38.020>then, <00:32:38.176>uh, <00:32:38.331>yeah, <00:32:38.487>something <00:32:38.642>should <00:32:38.798>display <00:32:38.953>on <00:32:39.109>the <00:32:39.265>screen.

680
00:32:41.985 --> 00:32:44.885
<00:32:41.985>Uh, <00:32:42.185>yes, <00:32:42.385>from <00:32:42.584>the <00:32:42.784>user's <00:32:42.985>perspective <00:32:43.185>it <00:32:43.385>is,

681
00:32:45.185 --> 00:32:46.765
<00:32:45.185>but <00:32:45.418>from <00:32:45.651>a <00:32:45.885>technical <00:32:46.118>point <00:32:46.351>of <00:32:46.585>view,

682
00:32:46.835 --> 00:32:48.285
<00:32:46.835>it's <00:32:47.096>you <00:32:47.357>click <00:32:47.618>the <00:32:47.879>submit <00:32:48.140>button

683
00:32:48.625 --> 00:32:51.485
<00:32:48.625>and <00:32:48.800>then <00:32:48.975>some <00:32:49.150>fancy <00:32:49.325>animation <00:32:49.500>runs <00:32:49.675>which <00:32:49.850>fades <00:32:50.025>out

684
00:32:51.485 --> 00:32:52.805
<00:32:51.485>and <00:32:51.880>fades <00:32:52.277>in <00:32:52.673>something,

685
00:32:52.805 --> 00:32:55.365
<00:32:52.805>and <00:32:52.980>only <00:32:53.155>then <00:32:53.330>the <00:32:53.505>result, <00:32:53.680>uh, <00:32:53.855>can <00:32:54.030>be <00:32:54.205>seen.

686
00:32:55.425 --> 00:33:00.245
<00:32:55.425>So <00:32:55.580>you <00:32:55.736>should <00:32:55.891>put <00:32:56.047>that <00:32:56.202>into, <00:32:56.358>uh, <00:32:56.513>uh, <00:32:56.669>you, <00:32:56.825>you,

687
00:33:00.245 --> 00:33:04.445
<00:33:00.245>you, <00:33:00.419>you <00:33:00.594>should <00:33:00.770>remember <00:33:00.945>that <00:33:01.120>asynchronicity <00:33:01.294>is, <00:33:01.469>uh, <00:33:01.645>key

688
00:33:04.705 --> 00:33:05.765
<00:33:04.705>to <00:33:05.023>your <00:33:05.341>eye <00:33:05.659>testing.

689
00:33:05.945 --> 00:33:07.885
<00:33:05.945>So <00:33:06.225>be <00:33:06.504>sure <00:33:06.784>to <00:33:07.064>understand <00:33:07.345>how

690
00:33:07.885 --> 00:33:09.565
<00:33:07.885>to <00:33:08.118>test <00:33:08.351>things <00:33:08.585>in <00:33:08.818>an <00:33:09.051>asynchronous <00:33:09.285>way

691
00:33:09.745 --> 00:33:11.325
<00:33:09.745>and <00:33:10.024>how <00:33:10.304>to <00:33:10.584>wait <00:33:10.864>for <00:33:11.145>things.

692
00:33:11.385 --> 00:33:14.885
<00:33:11.385>And <00:33:11.540>this <00:33:11.696>is <00:33:11.851>super <00:33:12.007>important <00:33:12.162>when <00:33:12.318>doing <00:33:12.473>U <00:33:12.629>EYE <00:33:12.785>testing.

693
00:33:17.035 --> 00:33:20.405
<00:33:17.035>Yeah, <00:33:17.210>finally, <00:33:17.385>when <00:33:17.560>we're <00:33:17.735>talking <00:33:17.910>about <00:33:18.085>UI <00:33:18.260>testing, <00:33:18.435>um,

694
00:33:20.575 --> 00:33:22.765
<00:33:20.575>there <00:33:20.750>was <00:33:20.925>just <00:33:21.100>the <00:33:21.275>question, <00:33:21.450>what's <00:33:21.625>the <00:33:21.800>best <00:33:21.975>practice

695
00:33:22.765 --> 00:33:24.685
<00:33:22.765>to <00:33:23.045>test <00:33:23.325>front <00:33:23.605>end <00:33:23.885>or <00:33:24.165>presentations?

696
00:33:25.385 --> 00:33:29.285
<00:33:25.385>Um, <00:33:25.560>that's <00:33:25.735>a <00:33:25.910>very, <00:33:26.085>that's <00:33:26.260>a <00:33:26.435>very <00:33:26.610>broad <00:33:26.785>question.

697
00:33:29.905 --> 00:33:33.085
<00:33:29.905>Um, <00:33:30.060>generally <00:33:30.216>speaking, <00:33:30.371>as <00:33:30.527>I <00:33:30.682>already <00:33:30.838>said, <00:33:30.993>I'd <00:33:31.149>say, <00:33:31.305>well,

698
00:33:33.085 --> 00:33:36.085
<00:33:33.085>first, <00:33:33.240>let's, <00:33:33.396>uh, <00:33:33.551>try <00:33:33.707>to <00:33:33.862>test <00:33:34.018>your, <00:33:34.173>your <00:33:34.329>eye <00:33:34.485>components

699
00:33:36.145 --> 00:33:38.845
<00:33:36.145>and <00:33:36.320>your <00:33:36.495>eye <00:33:36.670>components <00:33:36.845>if <00:33:37.020>you <00:33:37.195>build <00:33:37.370>them <00:33:37.545>correctly.

700
00:33:38.845 --> 00:33:40.565
<00:33:38.845>You <00:33:39.045>have <00:33:39.245>two <00:33:39.445>types <00:33:39.645>of <00:33:39.845>your <00:33:40.045>eye <00:33:40.245>components.

701
00:33:41.055 --> 00:33:42.485
<00:33:41.055>First <00:33:41.312>of <00:33:41.569>all, <00:33:41.827>you <00:33:42.084>have, <00:33:42.341>uh,

702
00:33:42.485 --> 00:33:44.405
<00:33:42.485>the <00:33:42.951>so-called <00:33:43.418>presentational <00:33:43.885>components,

703
00:33:44.405 --> 00:33:47.885
<00:33:44.405>which <00:33:44.580>only <00:33:44.754>display <00:33:44.930>things <00:33:45.105>and <00:33:45.280>which <00:33:45.455>are <00:33:45.629>rather <00:33:45.805>dump.

704
00:33:48.065 --> 00:33:50.645
<00:33:48.065>And <00:33:48.345>you <00:33:48.625>have <00:33:48.905>so-called <00:33:49.185>smart <00:33:49.465>components

705
00:33:50.825 --> 00:33:52.405
<00:33:50.825>or <00:33:51.525>container <00:33:52.225>components

706
00:33:52.465 --> 00:33:53.765
<00:33:52.465>or <00:33:52.632>whatever <00:33:52.799>you <00:33:52.966>would <00:33:53.133>like <00:33:53.300>to <00:33:53.467>call <00:33:53.635>them,

707
00:33:54.095 --> 00:33:55.885
<00:33:54.095>which <00:33:54.445>basically <00:33:54.795>only <00:33:55.145>do, <00:33:55.495>um,

708
00:33:56.115 --> 00:33:58.605
<00:33:56.115>integrate <00:33:56.465>all <00:33:56.815>those <00:33:57.165>presentational <00:33:57.515>components

709
00:33:58.705 --> 00:33:59.805
<00:33:58.705>and <00:33:59.034>stitch <00:33:59.365>them <00:33:59.695>together,

710
00:34:00.225 --> 00:34:02.485
<00:34:00.225>and <00:34:00.458>then <00:34:00.691>provide <00:34:00.925>the <00:34:01.158>logic <00:34:01.391>for <00:34:01.625>them,

711
00:34:02.715 --> 00:34:04.285
<00:34:02.715>care <00:34:03.181>about <00:34:03.648>data <00:34:04.115>fetching

712
00:34:04.285 --> 00:34:06.045
<00:34:04.285>and <00:34:04.565>things <00:34:04.845>like <00:34:05.125>that, <00:34:05.405>state <00:34:05.685>management.

713
00:34:06.505 --> 00:34:08.885
<00:34:06.505>And <00:34:06.680>so <00:34:06.855>this <00:34:07.030>is, <00:34:07.205>I <00:34:07.380>think, <00:34:07.555>very, <00:34:07.730>very <00:34:07.905>important

714
00:34:08.945 --> 00:34:11.405
<00:34:08.945>to <00:34:09.225>keep <00:34:09.505>these <00:34:09.785>things <00:34:10.065>separate <00:34:10.345>so

715
00:34:11.405 --> 00:34:14.725
<00:34:11.405>that <00:34:11.605>you <00:34:11.805>have <00:34:12.005>components <00:34:12.205>which <00:34:12.405>are <00:34:12.605>only, <00:34:12.805>um,

716
00:34:15.305 --> 00:34:18.165
<00:34:15.304>for <00:34:15.480>displaying <00:34:15.654>data <00:34:15.830>and <00:34:16.004>taking <00:34:16.179>inputs <00:34:16.355>from <00:34:16.529>the <00:34:16.705>user,

717
00:34:18.225 --> 00:34:19.965
<00:34:18.225>but <00:34:18.505>no <00:34:18.784>processing, <00:34:19.065>no <00:34:19.344>state <00:34:19.625>handling,

718
00:34:20.225 --> 00:34:21.565
<00:34:20.225>no <00:34:20.466>data <00:34:20.707>fetching <00:34:20.948>and <00:34:21.189>so <00:34:21.431>on.

719
00:34:21.945 --> 00:34:24.885
<00:34:21.945>And <00:34:22.100>you <00:34:22.256>have <00:34:22.411>other <00:34:22.567>components <00:34:22.722>which <00:34:22.878>does <00:34:23.033>all <00:34:23.189>these <00:34:23.345>side

720
00:34:24.885 --> 00:34:27.085
<00:34:24.885>effects, <00:34:25.118>but <00:34:25.351>which <00:34:25.585>does <00:34:25.818>not <00:34:26.051>take <00:34:26.285>care

721
00:34:27.085 --> 00:34:28.445
<00:34:27.085>of <00:34:27.493>any <00:34:27.901>presentational <00:34:28.309>stuff

722
00:34:28.465 --> 00:34:31.885
<00:34:28.465>or <00:34:28.745>very, <00:34:29.025>very, <00:34:29.305>um, <00:34:29.585>simple, <00:34:29.865>uh,

723
00:34:31.885 --> 00:34:34.605
<00:34:31.885>presentational <00:34:32.118>stuff <00:34:32.351>like <00:34:32.585>layouting <00:34:32.818>things <00:34:33.051>in <00:34:33.285>a

724
00:34:34.605 --> 00:34:35.725
<00:34:34.605>row <00:34:34.857>or <00:34:35.109>something <00:34:35.360>like <00:34:35.612>that.

725
00:34:36.425 --> 00:34:38.965
<00:34:36.425>And <00:34:36.600>once <00:34:36.775>you've <00:34:36.950>done <00:34:37.125>that, <00:34:37.300>you <00:34:37.475>can <00:34:37.650>finally <00:34:37.825>come

726
00:34:38.985 --> 00:34:42.085
<00:34:38.985>to <00:34:39.112>something <00:34:39.239>like, <00:34:39.366>now <00:34:39.494>we <00:34:39.621>would <00:34:39.748>like <00:34:39.875>to <00:34:40.003>test <00:34:40.130>the <00:34:40.257>entire <00:34:40.385>ui,

727
00:34:42.585 --> 00:34:43.845
<00:34:42.585>uh, <00:34:42.868>in <00:34:43.152>its <00:34:43.435>entire <00:34:43.719>team.

728
00:34:43.985 --> 00:34:47.245
<00:34:43.985>And, <00:34:44.140>uh, <00:34:44.296>there <00:34:44.451>we <00:34:44.607>will <00:34:44.762>probably <00:34:44.918>be <00:34:45.073>talking <00:34:45.229>about <00:34:45.385>something

729
00:34:47.315 --> 00:34:48.525
<00:34:47.315>such <00:34:47.859>as <00:34:48.404>Selenium.

730
00:34:49.265 --> 00:34:53.365
<00:34:49.264>Um, <00:34:49.464>some <00:34:49.665>people <00:34:49.864>prefer <00:34:50.065>Cypress, <00:34:50.264>uh, <00:34:50.464>over <00:34:50.665>Selenium.

731
00:34:53.365 --> 00:34:54.965
<00:34:53.364>It's <00:34:53.645>the <00:34:53.924>way <00:34:54.205>more <00:34:54.484>modern <00:34:54.764>approach.

732
00:34:55.115 --> 00:34:59.285
<00:34:55.114>It's, <00:34:55.242>uh, <00:34:55.369>to <00:34:55.496>be <00:34:55.624>honest, <00:34:55.751>it's <00:34:55.878>way <00:34:56.005>more <00:34:56.133>fun <00:34:56.260>to <00:34:56.387>use <00:34:56.514>Cypress,

733
00:34:59.745 --> 00:35:01.085
<00:34:59.745>uh, <00:35:00.046>than <00:35:00.348>to <00:35:00.649>use <00:35:00.951>Selenium.

734
00:35:01.155 --> 00:35:04.685
<00:35:01.155>Unfortunately, <00:35:01.355>selenium <00:35:01.555>is <00:35:01.755>still, <00:35:01.955>um, <00:35:02.155>yeah, <00:35:02.355>unbeaten <00:35:02.555>in,

735
00:35:04.685 --> 00:35:09.405
<00:35:04.685>in <00:35:04.812>a <00:35:04.939>lot <00:35:05.066>of <00:35:05.194>cases, <00:35:05.321>like, <00:35:05.448>uh, <00:35:05.575>real <00:35:05.703>mobile <00:35:05.830>devices <00:35:05.957>like, <00:35:06.085>uh,

736
00:35:09.605 --> 00:35:11.765
<00:35:09.605>internet <00:35:09.885>Explorer <00:35:10.165>11 <00:35:10.445>and <00:35:10.725>so <00:35:11.005>on.

737
00:35:11.765 --> 00:35:14.445
<00:35:11.765>And, <00:35:11.904>and <00:35:12.045>for <00:35:12.185>all <00:35:12.325>these <00:35:12.464>things, <00:35:12.605>uh, <00:35:12.745>you <00:35:12.884>cannot <00:35:13.025>use <00:35:13.165>Cypress

738
00:35:14.445 --> 00:35:18.485
<00:35:14.445>and <00:35:14.620>there <00:35:14.795>is <00:35:14.970>just <00:35:15.145>no <00:35:15.320>reasonable <00:35:15.495>alternative <00:35:15.670>to <00:35:15.845>Selenium.

739
00:35:18.945 --> 00:35:21.525
<00:35:18.945>Um, <00:35:19.225>when <00:35:19.505>you <00:35:19.785>get <00:35:20.065>Selenium <00:35:20.345>up

740
00:35:21.525 --> 00:35:23.885
<00:35:21.525>and <00:35:21.725>running, <00:35:21.925>especially <00:35:22.125>if <00:35:22.325>you <00:35:22.525>maybe <00:35:22.725>get <00:35:22.925>it

741
00:35:23.885 --> 00:35:26.685
<00:35:23.885>as <00:35:24.085>a <00:35:24.285>managed <00:35:24.485>solutions <00:35:24.685>such <00:35:24.885>with <00:35:25.085>companies <00:35:25.285>such

742
00:35:26.685 --> 00:35:28.645
<00:35:26.685>as <00:35:26.965>Sauce <00:35:27.245>Labs <00:35:27.525>or <00:35:27.805>Browser <00:35:28.085>Stack.

743
00:35:28.645 --> 00:35:29.965
<00:35:28.645>First <00:35:28.843>of <00:35:29.041>all, <00:35:29.239>this <00:35:29.437>feels <00:35:29.635>pretty <00:35:29.833>good

744
00:35:29.965 --> 00:35:33.365
<00:35:29.965>because <00:35:30.140>now <00:35:30.315>you <00:35:30.490>can <00:35:30.665>actually <00:35:30.840>test <00:35:31.015>on <00:35:31.190>real <00:35:31.365>browsers

745
00:35:33.365 --> 00:35:36.765
<00:35:33.365>and <00:35:33.504>you <00:35:33.645>can <00:35:33.785>do <00:35:33.924>cross <00:35:34.064>browser <00:35:34.205>testing <00:35:34.345>with <00:35:34.484>one <00:35:34.625>code <00:35:34.765>base.

746
00:35:37.585 --> 00:35:39.805
<00:35:37.585>The <00:35:37.818>bad <00:35:38.051>news <00:35:38.285>first <00:35:38.518>bad <00:35:38.751>news <00:35:38.985>is

747
00:35:40.035 --> 00:35:42.565
<00:35:40.035>that <00:35:40.210>it <00:35:40.384>doesn't <00:35:40.560>run <00:35:40.734>on <00:35:40.910>your <00:35:41.085>local <00:35:41.259>machine <00:35:41.435>anymore

748
00:35:42.565 --> 00:35:45.565
<00:35:42.565>because <00:35:42.720>you <00:35:42.876>can't <00:35:43.031>have <00:35:43.187>Windows <00:35:43.342>and <00:35:43.498>Linux <00:35:43.653>and <00:35:43.809>Mac <00:35:43.965>Os

749
00:35:46.025 --> 00:35:48.565
<00:35:46.025>and, <00:35:46.225>uh, <00:35:46.425>50 <00:35:46.625>different <00:35:46.825>versions <00:35:47.025>of <00:35:47.225>th <00:35:47.425>uh,

750
00:35:48.565 --> 00:35:51.325
<00:35:48.565>30 <00:35:48.765>different <00:35:48.965>browsers <00:35:49.165>all <00:35:49.365>on <00:35:49.565>your <00:35:49.765>local <00:35:49.965>machine.

751
00:35:51.385 --> 00:35:54.485
<00:35:51.385>So <00:35:51.525>you <00:35:51.665>need <00:35:51.805>to <00:35:51.945>think <00:35:52.085>about <00:35:52.225>how <00:35:52.365>to <00:35:52.505>split <00:35:52.645>this <00:35:52.785>so

752
00:35:54.485 --> 00:35:58.325
<00:35:54.485>that <00:35:54.660>you <00:35:54.835>can <00:35:55.010>run <00:35:55.185>some <00:35:55.360>UI <00:35:55.535>tests <00:35:55.710>locally, <00:35:55.885>um,

753
00:35:58.335 --> 00:36:02.245
<00:35:58.335>maybe <00:35:58.510>something <00:35:58.685>such <00:35:58.860>as <00:35:59.035>Chrome <00:35:59.210>only <00:35:59.385>or <00:35:59.560>Firefox <00:35:59.735>only,

754
00:36:02.785 --> 00:36:06.525
<00:36:02.785>and <00:36:02.960>in <00:36:03.134>your <00:36:03.310>CICD <00:36:03.484>environment, <00:36:03.660>then <00:36:03.835>the <00:36:04.009>entire <00:36:04.185>show

755
00:36:06.525 --> 00:36:09.125
<00:36:06.525>with <00:36:06.700>all <00:36:06.875>the <00:36:07.050>different <00:36:07.225>browsers <00:36:07.400>on <00:36:07.575>all <00:36:07.750>the <00:36:07.925>different

756
00:36:09.125 --> 00:36:11.435
<00:36:09.125>operating <00:36:09.475>systems <00:36:09.825>and <00:36:10.175>so <00:36:10.525>on.

757
00:36:12.095 --> 00:36:16.035
<00:36:12.095>The <00:36:12.250>bad <00:36:12.406>thing <00:36:12.561>is <00:36:12.717>about <00:36:12.872>Selenium, <00:36:13.028>but <00:36:13.183>it's <00:36:13.339>super <00:36:13.495>slow.

758
00:36:16.195 --> 00:36:18.515
<00:36:16.195>I <00:36:16.370>mean, <00:36:16.545>it's, <00:36:16.720>it's <00:36:16.895>highly <00:36:17.070>impressive <00:36:17.245>what <00:36:17.420>they <00:36:17.595>do,

759
00:36:19.055 --> 00:36:22.355
<00:36:19.055>but <00:36:19.288>it's <00:36:19.521>definitely <00:36:19.754>the <00:36:19.988>opposite <00:36:20.221>of <00:36:20.455>Fast.

760
00:36:22.735 --> 00:36:26.075
<00:36:22.735>And, <00:36:22.875>uh, <00:36:23.015>so <00:36:23.155>every <00:36:23.295>time <00:36:23.435>when <00:36:23.575>you <00:36:23.715>start <00:36:23.855>a <00:36:23.995>new <00:36:24.135>browser

761
00:36:26.475 --> 00:36:28.635
<00:36:26.475>instance, <00:36:26.674>it <00:36:26.875>takes <00:36:27.075>time <00:36:27.275>and <00:36:27.475>you <00:36:27.674>sit <00:36:27.875>there

762
00:36:28.655 --> 00:36:32.315
<00:36:28.655>and <00:36:28.830>you <00:36:29.005>are <00:36:29.180>waiting <00:36:29.355>and, <00:36:29.530>uh, <00:36:29.705>doing <00:36:29.880>like <00:36:30.055>that.

763
00:36:32.695 --> 00:36:35.115
<00:36:32.695>And, <00:36:32.928>uh, <00:36:33.161>then <00:36:33.395>yes, <00:36:33.628>your <00:36:33.861>test <00:36:34.095>runs

764
00:36:35.295 --> 00:36:38.355
<00:36:35.295>and <00:36:35.470>the <00:36:35.645>browser <00:36:35.820>instance <00:36:35.995>goes <00:36:36.170>down <00:36:36.345>and <00:36:36.520>you're <00:36:36.695>waiting

765
00:36:38.615 --> 00:36:40.155
<00:36:38.615>and <00:36:38.892>waiting, <00:36:39.169>and <00:36:39.446>then <00:36:39.723>the <00:36:40.001>next

766
00:36:40.155 --> 00:36:41.355
<00:36:40.155>browser <00:36:40.515>instance <00:36:40.875>gets <00:36:41.235>started.

767
00:36:41.455 --> 00:36:46.075
<00:36:41.455>And <00:36:41.571>so <00:36:41.688>lots <00:36:41.805>of <00:36:41.921>time, <00:36:42.038>uh, <00:36:42.154>goes <00:36:42.271>by <00:36:42.388>with <00:36:42.505>the <00:36:42.621>overhead <00:36:42.738>of, <00:36:42.855>uh,

768
00:36:46.075 --> 00:36:48.235
<00:36:46.075>setting <00:36:46.308>up <00:36:46.541>and <00:36:46.774>tearing <00:36:47.008>down <00:36:47.241>browser <00:36:47.475>instances.

769
00:36:48.855 --> 00:36:51.475
<00:36:48.855>So, <00:36:49.030>and, <00:36:49.205>and <00:36:49.380>now <00:36:49.555>you <00:36:49.730>need <00:36:49.905>to <00:36:50.080>multiply <00:36:50.255>this

770
00:36:51.585 --> 00:36:53.795
<00:36:51.585>with <00:36:51.740>all <00:36:51.896>the <00:36:52.051>browser <00:36:52.207>versions <00:36:52.362>you <00:36:52.518>would <00:36:52.673>like <00:36:52.829>to <00:36:52.985>have,

771
00:36:53.825 --> 00:36:56.795
<00:36:53.825>like <00:36:54.024>Chrome <00:36:54.225>and <00:36:54.424>Firefox <00:36:54.625>and <00:36:54.825>Safari <00:36:55.024>and <00:36:55.225>Opera

772
00:36:56.935 --> 00:37:00.875
<00:36:56.935>and, <00:36:57.090>uh, <00:36:57.246>internet <00:36:57.401>Explorer <00:36:57.557>and <00:36:57.712>Edge <00:36:57.868>and <00:36:58.023>uh, <00:36:58.179>so <00:36:58.335>on,

773
00:37:00.935 --> 00:37:05.195
<00:37:00.935>and <00:37:01.090>all <00:37:01.246>these <00:37:01.401>in <00:37:01.557>different <00:37:01.712>versions, <00:37:01.868>um, <00:37:02.023>like <00:37:02.179>Chrome <00:37:02.335>latest

774
00:37:05.335 --> 00:37:08.315
<00:37:05.335>and <00:37:05.510>Chrome <00:37:05.685>80 <00:37:05.860>and <00:37:06.035>Chrome <00:37:06.210>75 <00:37:06.385>and <00:37:06.560>so <00:37:06.735>on.

775
00:37:09.135 --> 00:37:13.035
<00:37:09.135>And, <00:37:09.290>uh, <00:37:09.446>this <00:37:09.601>on <00:37:09.757>asset <00:37:09.912>on <00:37:10.068>different <00:37:10.223>operating <00:37:10.379>systems <00:37:10.535>like

776
00:37:13.275 --> 00:37:14.515
<00:37:13.275>Linux, <00:37:13.647>Mac, <00:37:14.019>os, <00:37:14.391>windows.

777
00:37:15.095 --> 00:37:17.555
<00:37:15.095>And <00:37:15.294>in <00:37:15.495>addition, <00:37:15.694>you <00:37:15.895>need <00:37:16.095>all <00:37:16.294>those, <00:37:16.495>uh,

778
00:37:17.555 --> 00:37:20.835
<00:37:17.555>mobile <00:37:17.788>devices <00:37:18.021>again, <00:37:18.254>so <00:37:18.488>it <00:37:18.721>gets <00:37:18.955>really,

779
00:37:20.835 --> 00:37:22.915
<00:37:20.835>really <00:37:21.301>quickly, <00:37:21.768>really <00:37:22.235>complex.

780
00:37:23.055 --> 00:37:27.155
<00:37:23.055>And <00:37:23.230>so, <00:37:23.404>um, <00:37:23.580>to <00:37:23.754>handle <00:37:23.930>this <00:37:24.105>complexity, <00:37:24.279>uh, <00:37:24.455>you,

781
00:37:27.175 --> 00:37:30.195
<00:37:27.175>you <00:37:27.330>cannot <00:37:27.486>shrink <00:37:27.641>it <00:37:27.797>down <00:37:27.952>because <00:37:28.108>you <00:37:28.263>want <00:37:28.419>this <00:37:28.575>complexity.

782
00:37:30.195 --> 00:37:32.955
<00:37:30.195>You <00:37:30.350>want <00:37:30.506>to <00:37:30.661>know <00:37:30.817>how <00:37:30.972>does <00:37:31.128>your <00:37:31.283>software <00:37:31.439>behave, <00:37:31.595>uh,

783
00:37:32.975 --> 00:37:34.875
<00:37:32.975>on <00:37:33.255>browser <00:37:33.535>x, <00:37:33.815>on <00:37:34.095>device <00:37:34.375>Y.

784
00:37:35.415 --> 00:37:38.035
<00:37:35.415>Um, <00:37:35.570>so <00:37:35.726>in <00:37:35.881>the <00:37:36.037>end, <00:37:36.192>you <00:37:36.348>only <00:37:36.503>have <00:37:36.659>two <00:37:36.815>approaches.

785
00:37:38.035 --> 00:37:41.595
<00:37:38.035>Either <00:37:38.174>make <00:37:38.315>your <00:37:38.455>tests, <00:37:38.595>your, <00:37:38.734>your <00:37:38.875>I <00:37:39.015>tests <00:37:39.154>more <00:37:39.295>story <00:37:39.435>based,

786
00:37:42.095 --> 00:37:44.195
<00:37:42.095>not <00:37:42.328>as <00:37:42.561>fine <00:37:42.794>granular <00:37:43.028>as <00:37:43.261>unit <00:37:43.495>tests,

787
00:37:44.215 --> 00:37:47.275
<00:37:44.215>but <00:37:44.370>more <00:37:44.526>like, <00:37:44.681>well, <00:37:44.837>the <00:37:44.992>user <00:37:45.148>clicks <00:37:45.303>here, <00:37:45.459>then <00:37:45.615>there,

788
00:37:47.465 --> 00:37:50.635
<00:37:47.465>then <00:37:47.592>she <00:37:47.719>does <00:37:47.846>that, <00:37:47.974>and <00:37:48.101>then <00:37:48.228>she <00:37:48.355>assumes <00:37:48.483>that <00:37:48.610>this <00:37:48.737>is <00:37:48.865>there.

789
00:37:50.695 --> 00:37:52.355
<00:37:50.695>And <00:37:50.928>then <00:37:51.161>she <00:37:51.395>goes <00:37:51.628>on <00:37:51.861>like <00:37:52.095>that

790
00:37:52.855 --> 00:37:55.875
<00:37:52.855>and <00:37:53.055>more <00:37:53.255>like <00:37:53.455>a <00:37:53.655>full <00:37:53.855>driven <00:37:54.055>feature <00:37:54.255>stories.

791
00:37:56.695 --> 00:37:58.675
<00:37:56.695>And <00:37:56.928>the <00:37:57.161>other <00:37:57.395>thing <00:37:57.628>is <00:37:57.861>run <00:37:58.095>tests.

792
00:37:58.935 --> 00:38:02.475
<00:37:58.935>Uh, <00:37:59.110>probably <00:37:59.285>these <00:37:59.460>UI <00:37:59.634>tests <00:37:59.810>only <00:37:59.985>as <00:38:00.160>nightly <00:38:00.335>tests

793
00:38:02.475 --> 00:38:05.715
<00:38:02.475>because <00:38:02.630>then <00:38:02.786>nobody <00:38:02.941>takes <00:38:03.097>care <00:38:03.252>if <00:38:03.408>it <00:38:03.563>takes <00:38:03.719>four <00:38:03.875>hours

794
00:38:06.255 --> 00:38:10.195
<00:38:06.255>or <00:38:06.410>just <00:38:06.566>run <00:38:06.721>them <00:38:06.877>every <00:38:07.032>few <00:38:07.188>hours <00:38:07.343>automated, <00:38:07.499>independent <00:38:07.655>of

795
00:38:10.385 --> 00:38:13.435
<00:38:10.385>that, <00:38:10.585>somebody <00:38:10.785>of <00:38:10.985>your <00:38:11.185>developers <00:38:11.385>pushed <00:38:11.585>new <00:38:11.785>code

796
00:38:13.695 --> 00:38:15.275
<00:38:13.695>to <00:38:14.045>the <00:38:14.395>version <00:38:14.745>control <00:38:15.095>system.

797
00:38:15.375 --> 00:38:18.795
<00:38:15.375>So <00:38:15.502>keep <00:38:15.629>in <00:38:15.756>mind <00:38:15.884>that <00:38:16.011>your <00:38:16.138>eye <00:38:16.265>tests <00:38:16.393>are <00:38:16.520>not <00:38:16.647>unit <00:38:16.775>tests

798
00:38:19.175 --> 00:38:21.475
<00:38:19.175>and <00:38:19.375>don't <00:38:19.575>write <00:38:19.775>them <00:38:19.975>in <00:38:20.175>the <00:38:20.375>same <00:38:20.575>granularity,

799
00:38:22.055 --> 00:38:24.675
<00:38:22.055>and, <00:38:22.254>uh, <00:38:22.455>they <00:38:22.654>don't <00:38:22.855>target <00:38:23.055>the <00:38:23.254>same <00:38:23.455>things.

800
00:38:24.855 --> 00:38:28.435
<00:38:24.855>So <00:38:25.055>mistake <00:38:25.255>number <00:38:25.455>seven <00:38:25.655>is <00:38:25.855>simply <00:38:26.055>too <00:38:26.255>complex

801
00:38:28.455 --> 00:38:30.875
<00:38:28.455>and <00:38:28.735>too <00:38:29.015>fine <00:38:29.295>granular <00:38:29.575>UI <00:38:29.855>tests.

802
00:38:32.055 --> 00:38:34.955
<00:38:32.055>Now, <00:38:32.288>in <00:38:32.521>the <00:38:32.754>beginning <00:38:32.988>I <00:38:33.221>mentioned <00:38:33.455>TDD,

803
00:38:35.225 --> 00:38:38.285
<00:38:35.225>and <00:38:35.365>uh, <00:38:35.505>I <00:38:35.645>said <00:38:35.785>that <00:38:35.924>TDD <00:38:36.065>is, <00:38:36.205>uh, <00:38:36.345>a <00:38:36.485>good <00:38:36.625>thing

804
00:38:38.285 --> 00:38:41.245
<00:38:38.285>because <00:38:38.460>it <00:38:38.634>drives <00:38:38.810>you <00:38:38.984>to <00:38:39.160>writing <00:38:39.335>well <00:38:39.509>structured <00:38:39.685>code.

805
00:38:41.345 --> 00:38:43.765
<00:38:41.345>But <00:38:41.520>I <00:38:41.694>said <00:38:41.870>there <00:38:42.044>will <00:38:42.220>be <00:38:42.395>a <00:38:42.569>but, <00:38:42.745>um,

806
00:38:43.865 --> 00:38:45.885
<00:38:43.865>and <00:38:44.098>this, <00:38:44.331>uh, <00:38:44.564>time <00:38:44.798>is <00:38:45.031>now, <00:38:45.265>um,

807
00:38:46.765 --> 00:38:48.445
<00:38:46.765>TDD <00:38:46.998>is <00:38:47.231>often <00:38:47.464>being <00:38:47.698>sold <00:38:47.931>as <00:38:48.165>well.

808
00:38:48.445 --> 00:38:49.965
<00:38:48.445>Write <00:38:48.640>the <00:38:48.835>test <00:38:49.031>and <00:38:49.226>the <00:38:49.422>code <00:38:49.617>will <00:38:49.813>follow.

809
00:38:50.625 --> 00:38:54.125
<00:38:50.625>And <00:38:50.780>this <00:38:50.936>is <00:38:51.091>true <00:38:51.247>if <00:38:51.402>you <00:38:51.558>have <00:38:51.713>an <00:38:51.869>idea <00:38:52.025>of

810
00:38:54.125 --> 00:38:55.325
<00:38:54.125>where <00:38:54.341>you <00:38:54.557>want <00:38:54.772>to <00:38:54.989>go <00:38:55.205>to.

811
00:38:56.635 --> 00:38:58.445
<00:38:56.635>I've <00:38:56.985>too <00:38:57.335>often <00:38:57.685>seen, <00:38:58.035>um,

812
00:38:58.595 --> 00:39:02.045
<00:38:58.595>that <00:38:58.750>people <00:38:58.906>start <00:38:59.061>writing <00:38:59.217>tests <00:38:59.372>without <00:38:59.528>having <00:38:59.683>a <00:38:59.839>strategy <00:38:59.995>in

813
00:39:02.045 --> 00:39:05.445
<00:39:02.045>mind <00:39:02.185>with <00:39:02.325>having, <00:39:02.465>without <00:39:02.605>having <00:39:02.745>a <00:39:02.885>clear <00:39:03.025>goal <00:39:03.165>in <00:39:03.305>their <00:39:03.445>mind.

814
00:39:05.985 --> 00:39:08.405
<00:39:05.985>Um, <00:39:06.185>and <00:39:06.385>then <00:39:06.585>they <00:39:06.785>write <00:39:06.985>their <00:39:07.185>first <00:39:07.385>tests,

815
00:39:08.405 --> 00:39:10.205
<00:39:08.405>write <00:39:08.755>some <00:39:09.105>implementation, <00:39:09.455>realize, <00:39:09.805>oh,

816
00:39:10.205 --> 00:39:12.565
<00:39:10.205>we <00:39:10.438>forgot <00:39:10.671>the <00:39:10.904>parameter, <00:39:11.138>introduce <00:39:11.371>this <00:39:11.605>parameter,

817
00:39:12.705 --> 00:39:14.965
<00:39:12.705>and <00:39:12.880>then <00:39:13.055>have <00:39:13.230>to <00:39:13.404>adjust <00:39:13.580>all <00:39:13.755>the <00:39:13.930>existing <00:39:14.105>tests.

818
00:39:15.465 --> 00:39:17.925
<00:39:15.465>And <00:39:15.605>if <00:39:15.745>you <00:39:15.885>do <00:39:16.025>this <00:39:16.165>in <00:39:16.305>a <00:39:16.445>loop, <00:39:16.585>things <00:39:16.725>get <00:39:16.865>more

819
00:39:17.985 --> 00:39:20.165
<00:39:17.985>and <00:39:18.218>more <00:39:18.451>complex <00:39:18.685>and <00:39:18.918>super, <00:39:19.151>super <00:39:19.385>slow.

820
00:39:20.185 --> 00:39:23.205
<00:39:20.185>And <00:39:20.340>what <00:39:20.496>should <00:39:20.651>be <00:39:20.807>a <00:39:20.962>fun <00:39:21.118>exercise <00:39:21.273>in <00:39:21.429>the <00:39:21.585>beginning,

821
00:39:23.315 --> 00:39:24.565
<00:39:23.315>like <00:39:23.596>sketching <00:39:23.877>out <00:39:24.158>a <00:39:24.440>proof

822
00:39:24.565 --> 00:39:26.965
<00:39:24.565>of <00:39:24.915>concept <00:39:25.265>becomes <00:39:25.615>dramatically <00:39:25.965>slow.

823
00:39:27.105 --> 00:39:30.325
<00:39:27.105>So <00:39:27.260>TDD <00:39:27.416>is <00:39:27.571>fine <00:39:27.727>if <00:39:27.882>you <00:39:28.038>know <00:39:28.193>where <00:39:28.349>to <00:39:28.505>go,

824
00:39:30.625 --> 00:39:32.765
<00:39:30.625>but <00:39:30.800>if <00:39:30.975>you <00:39:31.150>don't <00:39:31.325>know <00:39:31.500>yet <00:39:31.675>where <00:39:31.850>to <00:39:32.025>go

825
00:39:32.765 --> 00:39:35.085
<00:39:32.765>because <00:39:32.998>you <00:39:33.231>don't <00:39:33.464>have <00:39:33.698>a <00:39:33.931>clear <00:39:34.165>picture

826
00:39:35.145 --> 00:39:38.565
<00:39:35.145>of <00:39:35.285>the <00:39:35.425>problem <00:39:35.565>in <00:39:35.705>your <00:39:35.845>mind, <00:39:35.985>then <00:39:36.125>TDD <00:39:36.265>won't <00:39:36.405>help <00:39:36.545>you.

827
00:39:38.785 --> 00:39:40.925
<00:39:38.785>In <00:39:39.018>contrast, <00:39:39.251>it'll <00:39:39.484>stand <00:39:39.718>in <00:39:39.951>your <00:39:40.185>way.

828
00:39:41.115 --> 00:39:44.605
<00:39:41.115>It's <00:39:41.254>like <00:39:41.395>with <00:39:41.535>agile, <00:39:41.674>agile, <00:39:41.814>if <00:39:41.955>you <00:39:42.095>don't <00:39:42.234>have <00:39:42.375>a <00:39:42.515>strategy,

829
00:39:44.715 --> 00:39:46.645
<00:39:44.715>it's <00:39:45.065>not <00:39:45.415>agile, <00:39:45.765>it's <00:39:46.115>anarchy.

830
00:39:47.345 --> 00:39:49.405
<00:39:47.345>And <00:39:47.625>TDD <00:39:47.904>is <00:39:48.185>the <00:39:48.464>very <00:39:48.745>same.

831
00:39:49.505 --> 00:39:51.765
<00:39:49.505>So <00:39:49.738>my <00:39:49.971>advice <00:39:50.205>here <00:39:50.438>is, <00:39:50.671>um, <00:39:50.905>be

832
00:39:51.765 --> 00:39:54.525
<00:39:51.765>because <00:39:51.940>people <00:39:52.115>often <00:39:52.290>ask, <00:39:52.464>well, <00:39:52.640>should <00:39:52.815>we <00:39:52.990>use <00:39:53.165>TDD?

833
00:39:54.525 --> 00:39:57.085
<00:39:54.525>Or <00:39:54.680>shouldn't <00:39:54.836>we <00:39:54.991>use <00:39:55.147>TDD <00:39:55.302>test <00:39:55.458>first <00:39:55.613>or <00:39:55.769>test <00:39:55.925>later?

834
00:39:57.465 --> 00:39:59.645
<00:39:57.465>My <00:39:57.698>advice <00:39:57.931>is <00:39:58.165>typically <00:39:58.398>do <00:39:58.631>three <00:39:58.865>things.

835
00:39:59.895 --> 00:40:01.965
<00:39:59.895>First, <00:40:00.595>write <00:40:01.295>quick

836
00:40:01.965 --> 00:40:05.445
<00:40:01.965>and <00:40:02.105>dirty <00:40:02.245>code <00:40:02.385>without <00:40:02.525>any <00:40:02.665>tests, <00:40:02.805>just <00:40:02.945>as <00:40:03.085>proof <00:40:03.225>of <00:40:03.365>concept

837
00:40:05.545 --> 00:40:08.885
<00:40:05.545>to <00:40:05.700>get <00:40:05.856>a <00:40:06.011>feeling <00:40:06.167>of <00:40:06.322>the <00:40:06.478>problem <00:40:06.633>at <00:40:06.789>hand, <00:40:06.945>to,

838
00:40:08.905 --> 00:40:10.885
<00:40:08.905>to <00:40:09.080>get <00:40:09.255>an <00:40:09.430>impression <00:40:09.605>of <00:40:09.780>what <00:40:09.955>should <00:40:10.130>your <00:40:10.305>signatures

839
00:40:10.885 --> 00:40:11.925
<00:40:10.885>of <00:40:11.119>the <00:40:11.353>functions <00:40:11.587>look <00:40:11.821>like?

840
00:40:11.925 --> 00:40:15.125
<00:40:11.925>What <00:40:12.080>should <00:40:12.236>the <00:40:12.391>API <00:40:12.547>look <00:40:12.702>like? <00:40:12.858>Does <00:40:13.013>this <00:40:13.169>even <00:40:13.325>work?

841
00:40:15.155 --> 00:40:16.205
<00:40:15.155>What <00:40:15.344>you <00:40:15.533>would <00:40:15.722>like <00:40:15.911>to <00:40:16.100>do?

842
00:40:16.705 --> 00:40:18.525
<00:40:16.705>And <00:40:17.055>if <00:40:17.404>you've <00:40:17.755>done <00:40:18.105>this,

843
00:40:18.545 --> 00:40:21.365
<00:40:18.545>and <00:40:18.672>if <00:40:18.799>you <00:40:18.926>now <00:40:19.054>have <00:40:19.181>the <00:40:19.308>feeling <00:40:19.435>that <00:40:19.563>you <00:40:19.690>got <00:40:19.817>the <00:40:19.945>idea,

844
00:40:21.895 --> 00:40:23.285
<00:40:21.895>throw <00:40:22.207>away <00:40:22.520>all <00:40:22.833>the <00:40:23.145>code.

845
00:40:23.285 --> 00:40:25.045
<00:40:23.285>This <00:40:23.518>is <00:40:23.751>the <00:40:23.984>most <00:40:24.218>important <00:40:24.451>step <00:40:24.685>here.

846
00:40:25.945 --> 00:40:28.005
<00:40:25.945>Um, <00:40:26.295>actually <00:40:26.645>throw <00:40:26.995>it <00:40:27.345>away.

847
00:40:28.225 --> 00:40:31.085
<00:40:28.225>Uh, <00:40:28.400>don't <00:40:28.575>tell <00:40:28.750>your <00:40:28.924>product <00:40:29.100>owner, <00:40:29.275>well, <00:40:29.450>we're <00:40:29.625>done.

848
00:40:31.105 --> 00:40:33.005
<00:40:31.105>Uh, <00:40:31.305>it's <00:40:31.505>only <00:40:31.705>a, <00:40:31.905>a <00:40:32.105>proof <00:40:32.305>of <00:40:32.505>concept.

849
00:40:33.115 --> 00:40:34.325
<00:40:33.115>It's <00:40:33.332>only <00:40:33.550>quick <00:40:33.768>and <00:40:33.986>dirty <00:40:34.203>code,

850
00:40:34.325 --> 00:40:36.245
<00:40:34.325>but <00:40:34.480>we <00:40:34.636>now <00:40:34.791>we <00:40:34.947>can <00:40:35.102>proceed <00:40:35.258>to <00:40:35.413>the <00:40:35.569>next <00:40:35.725>feature.

851
00:40:36.615 --> 00:40:38.765
<00:40:36.615>Don't <00:40:36.790>do <00:40:36.964>it <00:40:37.140>like <00:40:37.314>this, <00:40:37.490>actually <00:40:37.665>throw <00:40:37.839>it <00:40:38.015>away

852
00:40:39.065 --> 00:40:41.725
<00:40:39.065>and <00:40:39.345>then <00:40:39.625>proceed, <00:40:39.905>uh, <00:40:40.185>with <00:40:40.465>TDD,

853
00:40:41.725 --> 00:40:44.445
<00:40:41.725>because <00:40:41.865>now <00:40:42.005>you <00:40:42.145>have <00:40:42.285>a <00:40:42.424>strategy, <00:40:42.565>now <00:40:42.705>you <00:40:42.845>have <00:40:42.985>a <00:40:43.125>target.

854
00:40:45.025 --> 00:40:49.045
<00:40:45.025>So, <00:40:45.165>uh, <00:40:45.305>mistake <00:40:45.445>number <00:40:45.585>eight <00:40:45.725>is <00:40:45.865>applying <00:40:46.005>TDD <00:40:46.145>all <00:40:46.285>the <00:40:46.425>times.

855
00:40:49.325 --> 00:40:51.405
<00:40:49.325>TDD <00:40:49.500>is <00:40:49.674>a <00:40:49.850>great <00:40:50.024>thing, <00:40:50.200>but <00:40:50.375>don't <00:40:50.549>do <00:40:50.725>it.

856
00:40:51.785 --> 00:40:54.405
<00:40:51.785>If <00:40:51.940>you <00:40:52.096>are <00:40:52.251>prototyping, <00:40:52.407>if <00:40:52.562>you <00:40:52.718>are <00:40:52.873>working <00:40:53.029>on <00:40:53.185>proof

857
00:40:54.405 --> 00:40:58.245
<00:40:54.405>of <00:40:54.560>concepts <00:40:54.716>first, <00:40:54.871>figure <00:40:55.027>out <00:40:55.182>in <00:40:55.338>which <00:40:55.493>direction <00:40:55.649>you <00:40:55.805>want

858
00:40:58.245 --> 00:40:59.565
<00:40:58.245>to <00:40:58.442>go, <00:40:58.641>whether <00:40:58.839>it's <00:40:59.037>here <00:40:59.235>or <00:40:59.433>there,

859
00:40:59.565 --> 00:41:00.645
<00:40:59.565>and <00:40:59.808>what <00:41:00.051>your <00:41:00.294>strategy <00:41:00.537>is.

860
00:41:00.905 --> 00:41:05.285
<00:41:00.905>And <00:41:01.045>only <00:41:01.185>then, <00:41:01.325>once <00:41:01.465>you <00:41:01.605>know <00:41:01.745>that, <00:41:01.885>only <00:41:02.025>then <00:41:02.165>use <00:41:02.305>TDD.

861
00:41:05.285 --> 00:41:08.605
<00:41:05.285>And <00:41:05.401>if <00:41:05.518>you <00:41:05.634>do <00:41:05.751>this, <00:41:05.868>you <00:41:05.984>will <00:41:06.101>have <00:41:06.218>a <00:41:06.335>good <00:41:06.451>time <00:41:06.568>with <00:41:06.685>TDD.

862
00:41:09.265 --> 00:41:11.205
<00:41:09.265>So <00:41:09.545>this <00:41:09.825>was <00:41:10.105>mistake <00:41:10.384>number <00:41:10.665>eight.

863
00:41:11.305 --> 00:41:15.445
<00:41:11.305>And <00:41:11.432>now <00:41:11.559>to <00:41:11.686>summarize <00:41:11.814>all <00:41:11.941>of <00:41:12.068>this, <00:41:12.195>um, <00:41:12.323>if <00:41:12.450>I <00:41:12.577>think <00:41:12.705>back

864
00:41:15.445 --> 00:41:17.805
<00:41:15.445>of <00:41:15.725>my <00:41:16.005>12-year-old <00:41:16.285>self, <00:41:16.565>I <00:41:16.845>don't,

865
00:41:18.125 --> 00:41:20.005
<00:41:18.125>I <00:41:18.358>definitely <00:41:18.591>don't <00:41:18.825>want <00:41:19.058>to <00:41:19.291>go <00:41:19.525>back.

866
00:41:20.455 --> 00:41:23.245
<00:41:20.455>Tests <00:41:20.735>are <00:41:21.015>so <00:41:21.295>super, <00:41:21.575>super <00:41:21.855>important

867
00:41:23.305 --> 00:41:26.645
<00:41:23.305>and <00:41:23.504>I <00:41:23.705>cannot <00:41:23.904>imagine <00:41:24.105>anymore <00:41:24.305>working <00:41:24.504>without <00:41:24.705>tests.

868
00:41:26.805 --> 00:41:28.645
<00:41:26.805>I <00:41:26.980>even <00:41:27.154>wonder <00:41:27.330>how <00:41:27.504>I <00:41:27.680>made <00:41:27.855>it <00:41:28.029>for <00:41:28.205>years

869
00:41:28.995 --> 00:41:32.005
<00:41:28.995>with <00:41:29.194>software <00:41:29.395>development <00:41:29.595>without <00:41:29.795>having <00:41:29.995>written <00:41:30.194>a <00:41:30.395>single

870
00:41:32.005 --> 00:41:35.085
<00:41:32.005>test, <00:41:32.238>without <00:41:32.471>even <00:41:32.705>knowing <00:41:32.938>that <00:41:33.171>something <00:41:33.405>such

871
00:41:35.085 --> 00:41:36.125
<00:41:35.085>as <00:41:35.553>tests <00:41:36.021>existed.

872
00:41:36.265 --> 00:41:39.965
<00:41:36.265>So <00:41:36.420>this <00:41:36.576>is <00:41:36.731>so <00:41:36.887>important, <00:41:37.042>but <00:41:37.198>tests <00:41:37.353>are <00:41:37.509>not <00:41:37.665>an

873
00:41:39.985 --> 00:41:43.245
<00:41:39.985>and <00:41:40.140>in <00:41:40.296>itself <00:41:40.451>how, <00:41:40.607>uh, <00:41:40.762>instead <00:41:40.918>they <00:41:41.073>must <00:41:41.229>be <00:41:41.385>reasonable.

874
00:41:43.315 --> 00:41:45.805
<00:41:43.315>They, <00:41:43.548>uh, <00:41:43.781>help <00:41:44.015>you <00:41:44.248>reaching <00:41:44.481>a <00:41:44.715>goal.

875
00:41:46.305 --> 00:41:47.925
<00:41:46.305>And, <00:41:46.771>uh, <00:41:47.238>so, <00:41:47.705>uh,

876
00:41:47.925 --> 00:41:50.365
<00:41:47.925>the <00:41:48.100>effort <00:41:48.275>you <00:41:48.450>put <00:41:48.625>into <00:41:48.800>it <00:41:48.975>should <00:41:49.150>be <00:41:49.325>reasonable

877
00:41:50.465 --> 00:41:52.645
<00:41:50.465>and <00:41:50.665>you <00:41:50.865>should <00:41:51.065>think <00:41:51.265>about <00:41:51.465>what <00:41:51.665>to <00:41:51.865>test

878
00:41:52.705 --> 00:41:53.805
<00:41:52.705>and <00:41:52.952>how <00:41:53.200>to <00:41:53.447>test <00:41:53.694>things,

879
00:41:53.865 --> 00:41:56.885
<00:41:53.865>and <00:41:54.098>whether <00:41:54.331>it's <00:41:54.564>actually <00:41:54.798>worth <00:41:55.031>testing <00:41:55.265>everything.

880
00:41:56.885 --> 00:42:00.725
<00:41:56.885>There <00:41:57.060>are, <00:41:57.235>there <00:41:57.410>are <00:41:57.585>things <00:41:57.760>that <00:41:57.935>change <00:41:58.110>so <00:41:58.285>rarely

881
00:42:01.505 --> 00:42:04.845
<00:42:01.505>and <00:42:01.855>uh, <00:42:02.205>which <00:42:02.555>require <00:42:02.905>lots

882
00:42:04.845 --> 00:42:07.005
<00:42:04.845>and <00:42:05.044>huge <00:42:05.245>amounts <00:42:05.444>of <00:42:05.645>effort <00:42:05.845>to <00:42:06.044>being <00:42:06.245>tested.

883
00:42:07.585 --> 00:42:10.005
<00:42:07.585>Um, <00:42:07.785>but <00:42:07.985>if <00:42:08.185>they <00:42:08.385>get <00:42:08.585>broken, <00:42:08.785>it <00:42:08.985>will

884
00:42:10.635 --> 00:42:12.765
<00:42:10.635>immediately <00:42:10.985>crash <00:42:11.335>the <00:42:11.685>entire <00:42:12.035>application.

885
00:42:12.785 --> 00:42:16.085
<00:42:12.785>So <00:42:12.924>what's <00:42:13.065>the <00:42:13.205>point <00:42:13.345>of <00:42:13.484>putting <00:42:13.625>all <00:42:13.765>this <00:42:13.904>effort <00:42:14.045>into <00:42:14.185>testing?

886
00:42:16.085 --> 00:42:20.285
<00:42:16.085>Because <00:42:16.260>if <00:42:16.435>it <00:42:16.610>ever <00:42:16.785>changes, <00:42:16.960>which <00:42:17.135>is <00:42:17.310>very, <00:42:17.485>uh,

887
00:42:20.495 --> 00:42:22.445
<00:42:20.495>which <00:42:20.775>has <00:42:21.055>a <00:42:21.335>very <00:42:21.615>low <00:42:21.895>probability,

888
00:42:22.945 --> 00:42:24.445
<00:42:22.945>and <00:42:23.215>if <00:42:23.485>it <00:42:23.755>even <00:42:24.025>should <00:42:24.295>change,

889
00:42:24.545 --> 00:42:26.565
<00:42:24.545>if <00:42:24.778>it <00:42:25.011>crashes <00:42:25.245>the <00:42:25.478>entire <00:42:25.711>application <00:42:25.945>anyway,

890
00:42:27.115 --> 00:42:30.485
<00:42:27.115>then <00:42:27.314>everybody <00:42:27.515>will <00:42:27.714>realize <00:42:27.915>now <00:42:28.115>something <00:42:28.314>is <00:42:28.515>broke.

891
00:42:30.585 --> 00:42:33.405
<00:42:30.585>And <00:42:30.785>the <00:42:30.985>tests <00:42:31.185>also <00:42:31.385>only <00:42:31.585>tell <00:42:31.785>you, <00:42:31.985>well,

892
00:42:33.405 --> 00:42:36.645
<00:42:33.405>something <00:42:33.638>is <00:42:33.871>broke <00:42:34.105>now, <00:42:34.338>so <00:42:34.571>who <00:42:34.805>cares?

893
00:42:37.265 --> 00:42:41.645
<00:42:37.265>And, <00:42:37.404>uh, <00:42:37.545>so <00:42:37.685>don't <00:42:37.825>strive <00:42:37.964>for <00:42:38.105>100%, <00:42:38.245>don't <00:42:38.384>strive <00:42:38.525>for, <00:42:38.665>uh,

894
00:42:41.875 --> 00:42:45.205
<00:42:41.875>perfectness, <00:42:42.050>um, <00:42:42.225>but <00:42:42.400>do <00:42:42.575>it <00:42:42.750>with <00:42:42.925>a <00:42:43.100>reasonable <00:42:43.275>amount

895
00:42:45.305 --> 00:42:49.125
<00:42:45.305>and, <00:42:45.480>uh, <00:42:45.654>do <00:42:45.830>it, <00:42:46.004>uh, <00:42:46.180>with <00:42:46.355>best <00:42:46.529>effort <00:42:46.705>basically.

896
00:42:49.185 --> 00:42:52.765
<00:42:49.185>And <00:42:49.292>if <00:42:49.400>you <00:42:49.508>do <00:42:49.615>that, <00:42:49.723>I <00:42:49.831>think <00:42:49.938>that <00:42:50.046>then <00:42:50.154>you're <00:42:50.261>on <00:42:50.369>a <00:42:50.477>good <00:42:50.585>way.

897
00:42:53.305 --> 00:42:55.845
<00:42:53.305>And, <00:42:53.538>uh, <00:42:53.771>yeah, <00:42:54.004>this <00:42:54.238>was <00:42:54.471>for <00:42:54.705>today.

898
00:42:55.855 --> 00:42:58.245
<00:42:55.855>These <00:42:56.055>were <00:42:56.255>my <00:42:56.455>tips <00:42:56.655>and <00:42:56.855>hints <00:42:57.055>for <00:42:57.255>testing.

899
00:42:58.625 --> 00:43:01.045
<00:42:58.625>Thanks <00:42:58.800>for <00:42:58.975>joining <00:42:59.150>me, <00:42:59.325>and <00:42:59.500>have <00:42:59.675>a <00:42:59.850>nice <00:43:00.025>afternoon.

900
00:43:02.225 --> 00:43:02.445
Bye.