Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,510 --> 00:00:05,700
In this video I'm going to give an overview about testing in flutter and I will place to start with
2
00:00:05,700 --> 00:00:06,040
this.
3
00:00:06,120 --> 00:00:08,680
Is this page on the flatter documentation.
4
00:00:08,850 --> 00:00:15,990
And if we read this we can find out that flatter supports three types of tests and these are a unit.
5
00:00:15,990 --> 00:00:23,100
We did an integration tests and while this section covers testing in detail I also encourage you to
6
00:00:23,100 --> 00:00:27,730
try some of the recipes on this page as they cover the basics quite well.
7
00:00:28,120 --> 00:00:28,470
OK.
8
00:00:28,500 --> 00:00:31,650
So it's now time to look at the distinction between unit.
9
00:00:31,650 --> 00:00:38,730
We did an integration tests and according to the documentation our unit test tests are single function
10
00:00:38,730 --> 00:00:40,210
method of class.
11
00:00:40,320 --> 00:00:45,210
And the goal of our unit test is to verify the correctness of our unit of logic.
12
00:00:45,210 --> 00:00:47,460
And there are a variety of conditions.
13
00:00:47,790 --> 00:00:48,720
And in general.
14
00:00:48,720 --> 00:00:52,440
Unit tests are the simplest kind of test that we can encounter.
15
00:00:52,440 --> 00:00:54,480
And they also run very fast.
16
00:00:54,540 --> 00:01:00,420
So it is common for projects to have a lot of unit tests because they can test specific things at a
17
00:01:00,420 --> 00:01:01,970
very granular level.
18
00:01:02,010 --> 00:01:05,800
But we need a lot of them to get good test coverage.
19
00:01:05,940 --> 00:01:11,760
Then we have widget tests and these are used to test a single widget.
20
00:01:11,760 --> 00:01:18,930
And the goal of what we did test is to verify that we just UI eye looks and interacts as expected and
21
00:01:19,020 --> 00:01:25,200
as we will see they require a little bit more setup than unit tests but they can give us more confidence
22
00:01:25,230 --> 00:01:27,150
that our code works.
23
00:01:27,150 --> 00:01:33,450
And finally we have the integration tests and the goal of an integration test is to check that the entire
24
00:01:33,540 --> 00:01:38,700
up or a large part of the app works as expected and as we can read here.
25
00:01:38,700 --> 00:01:45,000
The goal of an integration test is to verify that all the widgets and services being tested worked together
26
00:01:45,090 --> 00:01:46,470
as expected.
27
00:01:46,470 --> 00:01:51,450
Furthermore you can use integration tests to verify your app's performance.
28
00:01:51,480 --> 00:01:58,170
So if we wanted we could view these three types of tests as layer of what is known as the test pyramid
29
00:01:58,500 --> 00:02:00,090
and a good testing strategy.
30
00:02:00,120 --> 00:02:02,730
Would they include all three of these layers.
31
00:02:02,730 --> 00:02:09,540
Because this gives us the most confidence that our code works as intended and in any case the entire
32
00:02:09,540 --> 00:02:15,330
picture about testing would not be complete without mentioning Continuous Integration Services.
33
00:02:15,330 --> 00:02:21,840
So I will not be covering spy services in this course but in my experience I have used both code magic
34
00:02:21,870 --> 00:02:27,780
and be tried in some of my client work and I found that they are both mature services that I would recommend
35
00:02:27,780 --> 00:02:28,950
for flatter projects.
36
00:02:29,490 --> 00:02:29,790
OK.
37
00:02:29,820 --> 00:02:31,790
So let's continue on the next video.
3728
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.