So let's go ahead and modify our little pipeline in order to add to the unit test in the execution as
well.
So let's add a new job called Unit Test.
And they will still be part of the state test.
Because we are relying on Gradle, we're going to use the same open JDK image.
The script will simply use the greater repr to execute a test command.
And there are two additional things that we want to do if the test fails.
We want to have access to the reports that have been generated.
So we need to define the artifact.
The artifacts are the following will have an artifact that has a path.
And this will be the e-mail report.
In order to have access to the reports will go to build reports and we'll see here tests test and this
is the a report that has been generated.
We can just go ahead and copy the entire path to tests.
And ended here.
Now, this would ensure that each time a report that has been generated is available here as well.
Additionally, what little Abassi can do is to understand reports that are formatted in the unit format.
You will see the unit format reports in test results test.
And these XML files, R.G. unit results.
For that reason, apart from parts, we are gonna use reports to unit.
And the path will be this one.
In addition to what we want to do is to add all the XML files that you see inside here, so all the
test results.
So for that reason, we don't want to specify each and every file.
And additionally, we want to include all the files, even if we later include more tests.
So for that reason, I will use this syntax to include all the external files that are available.
Finally, we want to ensure that the artifacts are always generated, so for that reason, we are going
to add an additional condition.
Am I going to say when this will be always.
We want to have the gionet reports always.
So let's see how this looks and get Lexi.
The first look at the pipeline will not reveal anything new, but actually there is if you look inside
the unit test tube.
You'll be able to browse the artifacts and you will see here the built folder, which contains the reports
as.
And this will be the e-mailed report, which documents what happened regarding the unitards.
And of course, here everything is successful, this is absolutely fine because then we can look at
which tests have been executed, which package are they?
We can get the view of the classes and so on.
This really more interesting is when going back to the pipeline.
Because you notice here another tab, which is called tests now, because we have specified the unit
test to get Lipsy, he can read the unit reports, which are in a similar format and can display this
additional information here.
So don't always have to go inside the FEMA report to use something.
But you can get here an overview over the unit tests here and you'll see that there are four in total
Nobelist each individual test.
And of course, in this case, all the tests were successful, but just in case they weren't successful,
would be able to see them here as well.
So it is a nice way on how you can integrate Janita reports with Laci.