about summary refs log tree commit diff
path: root/usth/ICT2.7/P4L3 White-Box Testing Subtitles/7 - Coverage Criteria Intro Quiz Solution - lang_en_vs4.srt
blob: 749a57ef6905fda4b6a161352da94399fcd4f490 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
1
00:00:00,090 --> 00:00:02,360
In this case like in many other cases, there's not just a

2
00:00:02,360 --> 00:00:05,550
single right answer because you can build many test cases that will

3
00:00:05,550 --> 00:00:09,730
satisfy this test specification. So for example, we could pick value 3

4
00:00:09,730 --> 00:00:13,640
for a and value 9 for b. Those satisfy the specification because a

5
00:00:13,640 --> 00:00:16,400
plus b is equal to 12 and therefore is greater than 0,

6
00:00:16,400 --> 00:00:19,470
and therefore this is a test case that implements this test specification.

7
00:00:19,470 --> 00:00:21,960
And in terms of results, what we expect to see is in

8
00:00:21,960 --> 00:00:25,200
the case of a result greater than 0, the caller should be red,

9
00:00:25,200 --> 00:00:28,109
and the upper value should be 12. And obviously for this test

10
00:00:28,109 --> 00:00:30,971
specification, we just need to pick two inputs such that the sum

11
00:00:30,971 --> 00:00:33,674
of the two inputs is less than 0. So for example, we

12
00:00:33,674 --> 00:00:37,125
could pick minus 5 and minus 8. The output color in this

13
00:00:37,125 --> 00:00:40,230
case is going to be blue, and the output value is going to be

14
00:00:40,230 --> 00:00:43,780
minus 13. So, what we just saw is basically how we can

15
00:00:43,780 --> 00:00:47,060
go from a piece of code to a set of requirements, which

16
00:00:47,060 --> 00:00:50,260
are the interesting aspects of the code that we want to exercise. How we

17
00:00:50,260 --> 00:00:52,800
can satisfy the requirements by finding

18
00:00:52,800 --> 00:00:54,700
the right test specifications, and then how

19
00:00:54,700 --> 00:00:58,450
we can initiate the test specifications into actual test cases. And this is

20
00:00:58,450 --> 00:01:01,010
what we will do in general when doing white books testing. And we'll

21
00:01:01,010 --> 00:01:02,520
do things likely different way, depending on

22
00:01:02,520 --> 00:01:04,230
the specific criteria that we are considering.