Report Portal Integration
Since v2.52.0
Gwen provides seamless integration with Report Portal for centralised reporting and analytics.
Configure connection
Set the following Report Portal client properties in your settings to configure a connection:
- .conf
- .json
- .properties
rp {
endpoint = "http://<host>:<port>"
uuid = "<uuid>"
launch = "<launch>"
project = "<project>"
}
Where
<host>
is your Report Portal server host<port>
is your Report Portal server port<uuid>
is your Report Portal server UUID<launch>
is your target launch name in Report Portal<project>
is your target project name in Report Portal
Example connecting to a local docker instance
rp {
endpoint = "http://localhost:8080"
uuid = "12a345b6-7c8d-9012-e3f4-567890a1b23c"
launch = "Gwen"
project = "default_personal"
}
{
"rp": {
"endpoint": "http://<host>:<port>",
"uuid": "<uuid>",
"launch": "<launch>",
"project": "<project>"
}
}
Where
<host>
is your Report Portal server host<port>
is your Report Portal server port<uuid>
is your Report Portal server UUID<launch>
is your target launch name in Report Portal<project>
is your target project name in Report Portal
Example connecting to a local docker instance
{
"rp": {
"endpoint": "http://localhost:8080",
"uuid": "12a345b6-7c8d-9012-e3f4-567890a1b23c",
"launch": "Gwen",
"project": "default_personal"
}
}
rp.endpoint = http://<host>:<port>
rp.uuid = <uuid>
rp.launch = <launch>
rp.project = <project>
Where
<host>
is your Report Portal server host<port>
is your Report Portal server port<uuid>
is your Report Portal server UUID<launch>
is your target launch name in Report Portal<project>
is your target project name in Report Portal
Example connecting to a local docker instance
rp.endpoint = http://localhost:8080
rp.uuid = 12a345b6-7c8d-9012-e3f4-567890a1b23c
rp.launch = Gwen
rp.project = default_personal
Logging Results
With the above settings in place, evaluation results will be asynchronously logged to your Report Portal server when you launch Gwen to execute your features with the -f rp
CLI option.
- Project
- Standalone
- Yarn
- npm
- pnpm
Executing features in the gwen/features/todo
folder and logging to report portal.
To log results to Report Portal only
yarn gwen -b -f rp gwen/features/todo
To generate HTML reports and send results to Report Portal
yarn -b f html,rp gwen/features/todo
Executing features in the gwen/features/todo
folder and logging to report portal.
To log results to Report Portal only
npm run gwen -- -b -f rp gwen/features/todo
To generate HTML reports and send results to Report Portal
npm run gwen -- -b f html,rp gwen/features/todo
Executing features in the gwen/features/todo
folder and logging to report portal.
To log results to Report Portal only
pnpm gwen -b -f rp gwen/features/todo
To generate HTML reports and send results to Report Portal
pnpm -b f html,rp gwen/features/todo
Output
- The results of all evaluated Gherkin nodes will be logged to your Report Portal server.
- The HTML report will be generated at
- Since Gwen 3
output/reports/index.html
.
- In prior versions
- You will need to specify
-r outdir
on the CLI to generate the HTML report in a desired directory.
- You will need to specify
- Since Gwen 3
- Linux
- Windows
Executing features in the features/todo
folder and logging to report portal.
To log results to Report Portal only
gwen -b -f rp features/todo
To generate HTML reports and send results to Report Portal
gwen -b f html,rp features/todo
Executing features in the features/todo
folder and logging to report portal.
To log results to Report Portal only
gwen -b -f rp features\todo
To generate HTML reports and send results to Report Portal
gwen -b f html,rp features\todo
Output
- The results of all evaluated Gherkin nodes will be logged to your Report Portal server.
- The HTML report will be generated at
- Since Gwen 3
output/reports/index.html
.
- In prior versions
- You will need to specify
-r outdir
on the CLI to generate the HTML report in a desired directory.
- You will need to specify
- Since Gwen 3
Reruns and merges
Merging into the previous launch
To merge current results with previous results in Report Portal, launch Gwen with the -Drp.rerun=true
system property on your CLI call. This will work only when launching Gwen consecutively on the same machine. You would otherwise need to specifically target the last launch as described in the next section.
Merging into a specific launch
To merge current results with any prior results in Report Portal, launch Gwen with both the -Drp.rerun=true
and -Drp.rerun.of=<launch-uuid>
system property on your CLI call. This will work when launching Gwen on any machine.
Where
<launch-uuid>
is the UUID of the Report Portal launch to merge to- You can retrieve the UUID for any launch from it's top level log in Report Portal
Additional settings
In addition to the standard Report Portal client properties, you can also configure the following Gwen specific Report Portal settings to control other reporting aspects:
gwen.rp.send.meta
Controls whether or not to send meta results to Report Portal.
gwen.rp.send.meta
gwen.rp.send.stepDefs
Controls how StepDefs are sent to Report Portal.
gwen.rp.send.stepDefs
Supported values
inlined
to inline StepDefs as log messagesnested
to nest StepDefs as report itemsnone
to not send StepDefs (default)
- .conf
- .json
- .properties
Default value
gwen {
rp {
send {
stepDefs = "none"
}
}
}
Default value
{
"gwen": {
"rp": {
"send": {
"stepDefs": "none"
}
}
}
}
Default value
gwen.rp.send.stepDefs = none
gwen.rp.send.failed.stepDefs
Controls how StepDefs are sent to Report Portal.
gwen.rp.send.failed.stepDefs
Only honoured when `gwen.rp.send.stepDefs` = none
.
Supported values
inlined
to inline failed StepDefs as log messages (default)nested
to nest failed StepDefs as report itemsnone
to not send failed StepDefs
- .conf
- .json
- .properties
Default value
gwen {
rp {
send {
failed {
stepDefs = "inlined"
}
}
}
}
Default value
{
"gwen": {
"rp": {
"send": {
"failed": {
"stepDefs": "inlined"
}
}
}
}
}
Default value
gwen.rp.send.failed.stepDefs = inlined
gwen.rp.send.failed.errorTrace
Controls how error traces are sent to Report Portal.
gwen.rp.send.failed.errorTrace
Supported values
attached
to log error traces as attachmentsinlined
to inline error traces as log messagesnone
to not send error traces (default)
- .conf
- .json
- .properties
Default value
gwen {
rp {
send {
failed {
errorTrace = "none"
}
}
}
}
Default value
{
"gwen": {
"rp": {
"send": {
"failed": {
"errorTrace": "none"
}
}
}
}
}
Default value
gwen.rp.send.failed.errorTrace = none
gwen.rp.send.failed.envTrace
Controls how environment traces are sent to Report Portal.
gwen.rp.send.failed.envTrace
Supported values
attached
to log environment traces as attachmentsinlined
to inline environment traces as log messagesnone
to not send environment traces (default)
- .conf
- .json
- .properties
Default value
gwen {
rp {
send {
failed {
envTrace = "none"
}
}
}
}
Default value
{
"gwen": {
"rp": {
"send": {
"failed": {
"envTrace": "none"
}
}
}
}
}
Default value
gwen.rp.send.failed.envTrace = none
gwen.rp.send.failed.hierarchy
Controls how call trace hierarchies are sent to Report Portal.
gwen.rp.send.failed.hierarchy
Supported values
attached
to log call trace hierarchies as attachmentsinlined
to inline call trace hierarchies as log messages (default)none
to not send call trace hierarchies
- .conf
- .json
- .properties
Default value
gwen {
rp {
send {
failed {
hierarchy = "inlined"
}
}
}
}
Default value
{
"gwen": {
"rp": {
"send": {
"failed": {
"hierarchy": "inlined"
}
}
}
}
}
Default value
gwen.rp.send.failed.hierarchy = inlined
gwen.rp.send.failed.errorBlocks
Controls how to send error blocks (highlights) to failed steps.
gwen.rp.send.failed.errorBlocks
Supported values
all
to send error blocks to all steps in a failed call traceleaf
to send error blocks to failed steps only (leaf nodes)none
to not send error blocks (default)
- .conf
- .json
- .properties
Default value
gwen {
rp {
send {
failed {
errorBlocks = "none"
}
}
}
}
Default value
{
"gwen": {
"rp": {
"send": {
"failed": {
"errorBlocks": "none"
}
}
}
}
}
Default value
gwen.rp.send.failed.errorBlocks = none
gwen.rp.send.annotations
Controls whether or not to send annotations to Report Portal.
gwen.rp.send.annotations
Similar to `gwen.rp.send.tags` but for annotations instead. Annotations are reserved Gwen tags that control runtime aspects, e.g: @Ignore, @Import("file.meta")
Supported values
true
to send annotationsfalse
to not send annotations (default)
- .conf
- .json
- .properties
Default value
gwen {
rp {
send {
annotations = false
}
}
}
Default value
{
"gwen": {
"rp": {
"send": {
"annotations": false
}
}
}
}
Default value
gwen.rp.send.annotations = false
gwen.rp.send.markdownBlocks
Controls whether or not to log all inlined steps in markdown blocks.
gwen.rp.send.markdownBlocks
Supported values
true
to log inlined steps in markdown blocks (default)false
to not log inlined steps in markdown blocks
- .conf
- .json
- .properties
Default value
gwen {
rp {
send {
markdownBlocks = true
}
}
}
Default value
{
"gwen": {
"rp": {
"send": {
"markdownBlocks": true
}
}
}
}
Default value
gwen.rp.send.markdownBlocks = true
gwen.rp.heartbeat.enabled
Controls whether or not to enable heartbeats to monitor the health status of your report portal server during execution.
Formerly gwen.rp.heartbeat
(prior to v3.0.0)
gwen.rp.heartbeat.enabled
Formerly
gwen.rp.heartbeat
(prior to v3.0.0)Supported values
true
to enable heartbeats (default)- Gwen will send a HTTP GET request to the Report Portal health endpoint before executing the first step in each Scenario and fail it if a non 200 response or bad health status is returned.
false
to disable heartbeats
- .conf
- .json
- .properties
Default value
gwen {
rp {
heartbeat {
enabled = true
}
}
}
Default value
{
"gwen": {
"rp": {
"heartbeat": {
"enabled": true
}
}
}
}
Default value
gwen.rp.heartbeat.enabled = true
gwen.rp.heartbeat.timeoutSecs
Controls how long to wait for a heartbeat response before timing out.
gwen.rp.heartbeat.timeoutSecs
Only honoured when `gwen.rp.heartbeat.enabled` = true
Supported values
- A positive integer denoting the number of seconds to wait for a heartbeat response before timing out (default =
3
).- If the connection cannot be established within the set timeout period, then Gwen will fail fast and report a timeout error.
- .conf
- .json
- .properties
Default value
gwen {
rp {
heartbeat {
timeoutSecs = 3
}
}
}
Default value
{
"gwen": {
"rp": {
"heartbeat": {
"timeoutSecs": 3
}
}
}
}
Default value
gwen.rp.heartbeat.timeoutSecs = 3
gwen.rp.testCaseId.keys
Controls how Report Portal test case IDs are generated.
gwen.rp.testCaseId.keys
Supported values
nodePath+params
to generate test case IDs based on the node path and parameters (default)sourceRef+params
to generate test case IDs based on the source reference and parametersauto
to use the default automatic test case ID generation mechanism of the client-java RP library (codeRef + params)
- .conf
- .json
- .properties
Default value
gwen {
rp {
testCaseId {
keys = "nodePath+params"
}
}
}
Default value
{
"gwen": {
"rp": {
"testCaseId": {
"keys": "nodePath+params"
}
}
}
}
Default value
gwen.rp.testCaseId.keys = nodePath+params
gwen.rp.debug
Controls whether or not to send node paths and parameters to the Report Portal debug log.
gwen.rp.debug