Tutor: Now we did learn about this triple A pattern 2 2
in the previous lecture. 3 3
Another thing I wanna mention here 4 4
about writing good tests, 5 5
is that you wanna keep your tests simple. 6 6
This is really important to me 7 7
because it's easy to build an overly complex test, 8 8
and here it would already be a bit too much 9 9
if you start adding a bunch of numbers in here. 10 10
Of course it will still work, 11 11
there's nothing wrong with it, 12 12
but which value does it add 13 13
if you add more numbers? 14 14
Of course, if you wanna test 15 15
whether the function maybe doesn't work correctly anymore 16 16
with more numbers, then this could be a reason 17 17
but this shouldn't go into a test 18 18
that just checks 19 19
whether the numbers are summarized. 20 20
For (indistinct), it's sufficient 21 21
if you have two numbers in that array. 22 22
So you wanna keep your tests 23 23
as simple and concise as possible, 24 24
and you don't wanna make them unnecessarily complex 25 25
because you always have to think about yourself coming back 26 26
to a test after a couple of weeks, 27 27
or may be a fellow developer diving into the test 28 28
and everyone should be able to quickly understand 29 29
and important, change this test if needed. 30 30
So keep things simple as we're doing it here. 31 31
And that of course was a lot 32 32
of talking about the first test 33 33
but this is the foundation 34 34
for the entire rest of this course 35 35
and for your Testing career in general. 36 36
So now with that out of the way, 37 37
let's dig a bit deeper into tests 38 38
and let's see which other kinds of tests we could write.