Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,350 --> 00:00:05,470
Now, when we speak about automated testing,
2
00:00:05,470 --> 00:00:09,140
it is important to understand that there are different kinds
3
00:00:09,140 --> 00:00:12,780
of automated tests which you can have a look at.
4
00:00:12,780 --> 00:00:16,820
For example, there are unit tests and I can already say
5
00:00:16,820 --> 00:00:19,700
that those will be super important.
6
00:00:19,700 --> 00:00:22,640
But you also have so-called integration tests
7
00:00:22,640 --> 00:00:25,230
and end to end tests.
8
00:00:25,230 --> 00:00:29,060
Now, these are the three main categories of tests
9
00:00:29,060 --> 00:00:30,480
which you can write.
10
00:00:30,480 --> 00:00:34,500
Unit tests are all about writing tests
11
00:00:34,500 --> 00:00:38,640
for the smallest possible units off your application.
12
00:00:38,640 --> 00:00:42,890
So for functions, individual functions that you use
13
00:00:42,890 --> 00:00:44,310
in your application.
14
00:00:44,310 --> 00:00:46,670
Or in case of React apps,
15
00:00:46,670 --> 00:00:49,950
testing some components independently
16
00:00:49,950 --> 00:00:52,970
from the other components in your app.
17
00:00:52,970 --> 00:00:56,200
And therefore projects typically contain a lot
18
00:00:56,200 --> 00:00:59,760
of unit tests, since you basically wanna test
19
00:00:59,760 --> 00:01:03,400
all the units, all the functions and components
20
00:01:03,400 --> 00:01:05,930
that make up your application.
21
00:01:05,930 --> 00:01:08,370
And hence this is the most common
22
00:01:08,370 --> 00:01:11,060
and important kind of test.
23
00:01:11,060 --> 00:01:12,720
And the idea simply is that
24
00:01:12,720 --> 00:01:16,140
if you test all the individual units on themselves,
25
00:01:16,140 --> 00:01:18,623
the overall application will also work.
26
00:01:19,480 --> 00:01:24,050
But to verify that the overall application really works
27
00:01:24,050 --> 00:01:26,500
if you put together all those units,
28
00:01:26,500 --> 00:01:28,860
we have integration tests.
29
00:01:28,860 --> 00:01:33,260
Here, we test the combination of multiple building blocks.
30
00:01:33,260 --> 00:01:36,443
For example, multiple components working together.
31
00:01:37,650 --> 00:01:39,780
And projects typically contain
32
00:01:39,780 --> 00:01:42,350
a couple of such integration tests,
33
00:01:42,350 --> 00:01:45,700
but not as many as you have unit tests.
34
00:01:45,700 --> 00:01:49,790
Though as you will also see throughout this course section,
35
00:01:49,790 --> 00:01:53,020
it's not always that easy to differentiate
36
00:01:54,138 --> 00:01:57,230
between unit and integration tests when testing React apps,
37
00:01:57,230 --> 00:02:00,210
since very often, you wanna test a component
38
00:02:00,210 --> 00:02:03,430
that also uses some other component.
39
00:02:03,430 --> 00:02:05,960
But we're going to see that in action
40
00:02:05,960 --> 00:02:07,930
throughout this course section.
41
00:02:07,930 --> 00:02:12,010
So generally, integration tests are also extremely important
42
00:02:12,010 --> 00:02:17,010
but we have fewer integration tests than we have unit tests.
43
00:02:17,400 --> 00:02:20,600
And then we also have end to end tests.
44
00:02:20,600 --> 00:02:25,600
These are all about testing entire workflows
45
00:02:25,870 --> 00:02:27,680
in your application, you could say.
46
00:02:27,680 --> 00:02:31,570
Entire scenarios, like logging a user in
47
00:02:31,570 --> 00:02:34,350
and then going to a certain page.
48
00:02:34,350 --> 00:02:39,350
So these aim to really reproduce what a real human would do
49
00:02:39,880 --> 00:02:41,600
with your website.
50
00:02:41,600 --> 00:02:44,950
Basically what you would also do with manual testing,
51
00:02:44,950 --> 00:02:46,710
just automated.
52
00:02:46,710 --> 00:02:50,580
Now, whilst this might sound like the most important test
53
00:02:50,580 --> 00:02:52,160
it definitely is important
54
00:02:52,160 --> 00:02:55,440
and you therefore typically do write some end to end tests
55
00:02:55,440 --> 00:02:58,770
but not as many as you have unit and integration tests,
56
00:02:58,770 --> 00:03:01,720
because if your a unit and integration tests work,
57
00:03:01,720 --> 00:03:06,130
you can be pretty sure that your overall application works.
58
00:03:06,130 --> 00:03:08,970
And then those unit and integration tests
59
00:03:08,970 --> 00:03:11,810
are simply easier to test.
60
00:03:11,810 --> 00:03:16,520
They often are quicker to run and they are more focused
61
00:03:16,520 --> 00:03:19,850
and it's way easier to test all possible scenarios,
62
00:03:19,850 --> 00:03:23,470
if you test all your units for different scenarios
63
00:03:23,470 --> 00:03:26,640
then coming up with all possible scenarios,
64
00:03:26,640 --> 00:03:28,880
if you look at your app as a whole,
65
00:03:28,880 --> 00:03:32,840
which is what you do typically with end to end tests.
66
00:03:32,840 --> 00:03:34,850
So these are important,
67
00:03:34,850 --> 00:03:37,590
but it's basically all to what you do manually
68
00:03:37,590 --> 00:03:41,520
and therefore you have fewer of those tests.
69
00:03:41,520 --> 00:03:44,700
Now in this course section, since it's an introduction
70
00:03:44,700 --> 00:03:45,550
to testing.
71
00:03:45,550 --> 00:03:48,350
We will focus on those most important kinds
72
00:03:48,350 --> 00:03:49,240
of tests.
73
00:03:49,240 --> 00:03:53,740
Unit tests and also to some extent integration tests.
74
00:03:53,740 --> 00:03:56,760
But at the end of the module, I will also point you
75
00:03:56,760 --> 00:03:59,650
at some other resources, which you can check out
76
00:03:59,650 --> 00:04:02,943
to dive deeper into React testing if you want to.
6121
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.