Skip to content

Commit f1139e3

Browse files
Merge pull request #241 from telekom/feature/reportng-docs-to-TT2
ReportNG doc update of Testerra 2
2 parents 0ea381a + 09a8d05 commit f1139e3

39 files changed

+252
-14
lines changed

docs/src/docs/execution/test-controller.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ CONTROL.collectAssertions(() -> {
1616
});
1717
----
1818

19+
See <<#_collected_assertions_2, here>> how collected assertions are presented in Report-NG.
20+
1921
== Optional assertions
2022

2123
Optional asserts do not let the test fail, but the assertion message will be added to the log with loglevel `WARN` and will result in an minor failure aspect.
@@ -29,6 +31,8 @@ CONTROL.optionalAssertions(() -> {
2931
});
3032
----
3133

34+
See <<#_optional_assertions_2, here>> how optional assertions are presented in Report-NG.
35+
3236
== Change internal timeout
3337

3438
To change the timeout for internal assertions, you can override it for a specified block.

docs/src/docs/gettingstarted/logging.adoc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,4 @@ Which results in a log message similar to
3838

3939
The markers `MCID` and `SCID` are referencing to the current MethodContext respectively SessionContext ID.
4040

41-
== Prompt messages
42-
43-
Very important messages can be prompted using:
44-
45-
[source,java]
46-
----
47-
log().warn("Important message", Loggable::prompt);
48-
----
49-
50-
That tells the Report to display these messages in a different way (optional).
41+
NOTE: Important messages can be prompted to the Report. See <<Priority Messages, here>> for more details.

docs/src/docs/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ include::execution.adoc[leveloffset=+1]
2828

2929
'''
3030
= Testerra Features
31+
include::reports.adoc[leveloffset=+1]
3132
include::modules.adoc[leveloffset=+1]
3233
include::utilities.adoc[leveloffset=+1]
3334

docs/src/docs/modules/layout-check.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ The following prerequisites must be met
2222
. Concrete execution environment: Layout tests should run in a concrete browser environment to ensure the comparability of the screenshots.
2323
** Size of browser window: Define fixed size to exclude different sizes of the images at different VM resolutions
2424
** Screen resolution and scaling: Make sure you have the same screen resolution and scaling on each presentation device.
25-
//. Build Server: The library underlying ANNOTATED mode supports the operating systems
26-
//** Windows 32 - and 64 - Bit
27-
//** Linux Debian 32 - and 64 - Bit (glibc >= 2.15; Jenkins)
28-
//** MacOSX (untested)
2925

3026
== Configuration
3127

@@ -86,3 +82,7 @@ When you have configured the reference screenshots location and implemented the
8682
to enable taking automatically screenshots based on the current browser and size configuration and storing them to the reference image's location.
8783

8884
WARNING: All concrete distance values in this {layoutcheck_takereference}-mode will return `0` (zero) and always pass the tests.
85+
86+
== Reporting
87+
88+
Report-NG provides a good presentation of the results of layout checks. See <<#_layout_checks, here>> for more details.

docs/src/docs/reports.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
= Reporting with Report-NG
2+
3+
include::reports/overview.adoc[leveloffset=+1]
4+
include::reports/setup.adoc[leveloffset=+1]
5+
include::reports/dashboard.adoc[leveloffset=+1]
6+
include::reports/testdetails.adoc[leveloffset=+1]
7+
include::reports/failure-aspects.adoc[leveloffset=+1]
8+
include::reports/log-view.adoc[leveloffset=+1]
9+
include::reports/threads-view.adoc[leveloffset=+1]
10+
include::reports/teststeps.adoc[leveloffset=+1]
11+
include::reports/prioritymessages.adoc[leveloffset=+1]
12+
include::reports/layout-check.adoc[leveloffset=+1]
13+
include::reports/assertions.adoc[leveloffset=+1]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
= More on Assertions
2+
3+
== Collected assertions
4+
5+
When <<#_collected_assertions, Collected assertions>> are used and some of its assertions fail the test is not aborted, but it will be marked as failure in `Report-NG`:
6+
7+
image::report-ng-22.png[align="center", alt="Failed collected assertions"]
8+
image::report-ng-19.png[align="center", alt="Assert Collector Details"]
9+
10+
The failures are marked in the step view:
11+
12+
image::report-ng-20.png[align="center", alt="Assert Collector Steps"]
13+
14+
15+
== Optional assertions
16+
17+
When <<#_optional_assertions, Optional assertions>> fail, the test will also be fully executed and will be marked as passed.
18+
19+
image::report-ng-21.png[align="center", alt="Optional Assert Pass"]
20+
image::report-ng-17.png[align="center", alt="Optional Assert Details"]
21+
22+
The failed optional asserts will be displayed as warnings:
23+
24+
image::report-ng-18.png[align="center", alt="Optional Assert Steps"]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
= Dashboard View
2+
3+
The dashboard view gives an overview of the last test execution. It shows the total number of executed tests and of passed, skipped or failed tests.
4+
5+
image::report-ng-05.png[align="center", alt="Dashboard"]
6+
7+
On the Breakdown panel is a pie chart that shows the proportions, displayed with different colors according to the test status.
8+
9+
Test status colors:
10+
[cols="2,^1,4",options="header"]
11+
|===
12+
| Color | Test Status | Description
13+
| Green | Passed | The test was passed.
14+
| Yellow | Skipped | The test was not executed, because a test it depends on failed.
15+
| Red | Failed | The test failed.
16+
| Dark Red | Expected Fail | The test failed, as expected e.g. because of a known bug or problem.
17+
|===
18+
19+
Check out the <<#Fails, @Fails>> Annotation to see how to mark a test as expected to fail.
20+
21+
Right beside the Breakdown pie chart you find another panel with the Top 3 failure types (aspects).
22+
There are two more panels below, one displaying detailed information about test execution duration, start and end times and another panel with a list of test classes that reports how many tests did pass, fail or were skipped in the individual test classes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
= Failure Aspects View
2+
3+
In case of many failures it is important to be able to find out the most severe failure reasons (aspects) that caused the most failed tests cases.
4+
5+
For this the Failure Aspect View was designed.
6+
7+
image::report-ng-11.png[align="center", alt="Failure Aspect View"]
8+
9+
It comes with a filter as well and shows the most occurred problems on the top with the number of tests that they caused to fail.
10+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
= Layout Checks
2+
3+
In case you are using <<#_layout_check, Layout Checks>> `Report-NG` provides special features to analyze failed layout tests.
4+
5+
== Comparison by Image Size
6+
7+
When a layout test failed because there is a difference of the image size
8+
between the actual screenshot and the reference image,
9+
`Report-NG` will add a failure aspect to the test details panel:
10+
11+
image::report-ng-14.png[align="center", alt="Wrong Image Size Failure Aspect"]
12+
13+
== Comparison by Pixel Distance
14+
15+
When a layout test failed because the percentage of the pixels that are different is too high (pixel distance) `Report-NG` will also add a failure aspect to the test details panel:
16+
17+
image::report-ng-15.png[align="center", alt="High Pixel Distance Size Failure Aspect"]
18+
19+
Furthermore, `Report-NG` provides a special dialog to compare the actual screenshot and the
20+
reference image to actually identify the mismatching pixels. It can be opened by clicking one of the three thumbnail images. The pixel comparison dialog provides a diamond shaped slider to change the size of the left and right part of the pixel comparison area. You can also select what is displayed on the left and right part, the actual screenshot, the reference image or the pixel difference:
21+
22+
image::report-ng-16.png[align="center", alt="Pixel Comparison Dialog"]
23+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
= Log View
2+
3+
The Log View shows all log information that were recorded during test execution.
4+
It allows to filter by message log level and to search log messages according to a given search term or keyword.
5+
6+
image::report-ng-12.png[align="center", alt="Log View"]

0 commit comments

Comments
 (0)