You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Report Portal uses external repository, so it URL also should be added to your build configuration
16
+
Report Portal core libraries are used, but it uses external repository, so it URL also should be added to your build configuration
17
17
```
18
18
<repositories>
19
19
<repository>
@@ -26,26 +26,54 @@ Report Portal uses external repository, so it URL also should be added to your b
26
26
</repository>
27
27
</repositories>
28
28
```
29
-
Actually from this point setup of integration is done. The only thing you should to do is to configure Report Portal itself. This process is described in [Report Portal Documentation](http://reportportal.io/docs/JVM-based-clients-configuration).
30
-
Now run your tests normally and report should appear on Report Portal. To add custom messages into report portal, just emit logs
29
+
Actually from this point setup of integration is done. The only thing you should to do is to configure Report Portal itself. In general it means just adding of `reportportal.properties` file to you project. Properties example is described below
30
+
```
31
+
rp.endpoint = http://report-portal-url
32
+
rp.uuid = 385bha54-c1df-42c7-afa4-9e4c028930af
33
+
rp.launch = My_Cool_Launch
34
+
rp.project = My_Cool_Project
35
+
```
36
+
For more details related to Report Portal configuration please reffer to [Report Portal Documentation](http://reportportal.io/docs/JVM-based-clients-configuration).
37
+
38
+
Now run your tests normally and report should appear on Report Portal in accordance to provided configuration. To add custom messages to Report Portal, you may emit logs in any place in your test
Message will appear in the scope of entity it was triggered. I. e. inside related test or step.
42
+
Message will appear in the scope of entity it was triggered. I. e. inside related step.
43
+
> **Notice**
44
+
> Actually to add logs to Report Portal, they should be emitted in scope of test method
35
45
36
46
Integration configuration
37
47
-------------
38
-
Integration provides two reporting styles:
39
48
40
-
- build steps as nested entities into tree `StepTreeHandler.class` (default)
41
-
- build steps as sequence of emited logs `StepFlatHandler.class`
49
+
Each Serenity `TestStep` is passed throug chain of configured `StepProcessors`. This approach allows to flexible configure reporting behaviour on the step level. All configuration is accessible from the code. By default integration provides two configuration profiles:
42
50
43
-
This behaviour may be configured using code snippet
51
+
- DEFAULT
52
+
- CUSTOM
53
+
54
+
`DEFAULT` profile is used by default and contains all usually required reporting details. To change default behavior `CUSTOM` profile shoul be used.
In example above `CUSTOM` profile with `ScreenshotAttacher` processor is configured. All step processors available out of the box may be observed in `com.github.invictum.reportportal.processor` package.
60
+
It is possible to use integrated processors as well as implemented by your own
46
61
```
47
-
> **Note**
48
-
Configuration should be provided only once, before any Serenity facility initialization. For example in `@BeforeClass` method
62
+
public class StartStepLogger implements StepProcessor {
63
+
64
+
@Override
65
+
public void proceed(final TestStep step) {
66
+
// You logic here to emit logs
67
+
}
68
+
}
69
+
```
70
+
> **Warning**
71
+
To emit log to Report Portal date should be specified. If log timestams is out of range of step it won't be emitted at all. `TestStep` contains all data to calculate start, end dates and duration
72
+
73
+
The order of processors registtration is matters, this order the same as order of invocation.
74
+
75
+
> **Notice**
76
+
Profile configuration should be provided before Serenity facility init (For example on `@BeforeClass` method on the parent test class). Otherwise default profile will be used.
0 commit comments