1
00:00:04,270 --> 00:00:12,220
So let's go ahead and modify our little pipeline in order to add to the unit test in the execution as

2
00:00:12,220 --> 00:00:12,540
well.

3
00:00:14,090 --> 00:00:16,570
So let's add a new job called Unit Test.

4
00:00:18,040 --> 00:00:20,860
And they will still be part of the state test.

5
00:00:22,760 --> 00:00:27,470
Because we are relying on Gradle, we're going to use the same open JDK image.

6
00:00:30,080 --> 00:00:35,930
The script will simply use the greater repr to execute a test command.

7
00:00:37,220 --> 00:00:41,190
And there are two additional things that we want to do if the test fails.

8
00:00:41,390 --> 00:00:44,630
We want to have access to the reports that have been generated.

9
00:00:44,750 --> 00:00:46,880
So we need to define the artifact.

10
00:00:47,330 --> 00:00:52,550
The artifacts are the following will have an artifact that has a path.

11
00:00:52,550 --> 00:00:54,910
And this will be the e-mail report.

12
00:00:56,420 --> 00:01:05,239
In order to have access to the reports will go to build reports and we'll see here tests test and this

13
00:01:05,239 --> 00:01:07,370
is the a report that has been generated.

14
00:01:08,150 --> 00:01:11,780
We can just go ahead and copy the entire path to tests.

15
00:01:15,520 --> 00:01:16,480
And ended here.

16
00:01:17,360 --> 00:01:22,070
Now, this would ensure that each time a report that has been generated is available here as well.

17
00:01:22,640 --> 00:01:30,010
Additionally, what little Abassi can do is to understand reports that are formatted in the unit format.

18
00:01:30,620 --> 00:01:36,200
You will see the unit format reports in test results test.

19
00:01:37,760 --> 00:01:40,940
And these XML files, R.G. unit results.

20
00:01:42,670 --> 00:01:47,920
For that reason, apart from parts, we are gonna use reports to unit.

21
00:01:49,170 --> 00:01:51,210
And the path will be this one.

22
00:01:55,800 --> 00:02:01,530
In addition to what we want to do is to add all the XML files that you see inside here, so all the

23
00:02:01,530 --> 00:02:02,190
test results.

24
00:02:02,550 --> 00:02:05,190
So for that reason, we don't want to specify each and every file.

25
00:02:05,190 --> 00:02:10,020
And additionally, we want to include all the files, even if we later include more tests.

26
00:02:10,380 --> 00:02:16,670
So for that reason, I will use this syntax to include all the external files that are available.

27
00:02:18,120 --> 00:02:23,340
Finally, we want to ensure that the artifacts are always generated, so for that reason, we are going

28
00:02:23,340 --> 00:02:24,780
to add an additional condition.

29
00:02:25,580 --> 00:02:29,120
Am I going to say when this will be always.

30
00:02:30,340 --> 00:02:32,440
We want to have the gionet reports always.

31
00:02:33,540 --> 00:02:35,400
So let's see how this looks and get Lexi.

32
00:02:36,870 --> 00:02:42,580
The first look at the pipeline will not reveal anything new, but actually there is if you look inside

33
00:02:42,580 --> 00:02:43,920
the unit test tube.

34
00:02:44,970 --> 00:02:51,570
You'll be able to browse the artifacts and you will see here the built folder, which contains the reports

35
00:02:51,600 --> 00:02:52,190
as.

36
00:02:53,140 --> 00:02:58,270
And this will be the e-mailed report, which documents what happened regarding the unitards.

37
00:02:59,270 --> 00:03:03,620
And of course, here everything is successful, this is absolutely fine because then we can look at

38
00:03:03,620 --> 00:03:06,970
which tests have been executed, which package are they?

39
00:03:07,130 --> 00:03:09,530
We can get the view of the classes and so on.

40
00:03:11,310 --> 00:03:14,610
This really more interesting is when going back to the pipeline.

41
00:03:16,410 --> 00:03:23,700
Because you notice here another tab, which is called tests now, because we have specified the unit

42
00:03:23,700 --> 00:03:31,110
test to get Lipsy, he can read the unit reports, which are in a similar format and can display this

43
00:03:31,110 --> 00:03:32,250
additional information here.

44
00:03:32,430 --> 00:03:35,850
So don't always have to go inside the FEMA report to use something.

45
00:03:35,850 --> 00:03:41,070
But you can get here an overview over the unit tests here and you'll see that there are four in total

46
00:03:41,390 --> 00:03:43,190
Nobelist each individual test.

47
00:03:43,200 --> 00:03:47,910
And of course, in this case, all the tests were successful, but just in case they weren't successful,

48
00:03:47,910 --> 00:03:49,510
would be able to see them here as well.

49
00:03:49,950 --> 00:03:54,690
So it is a nice way on how you can integrate Janita reports with Laci.

