Skip to main content

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:

  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"
}

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.

Example

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

Gwen CLI

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.

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.

Supported values

  • true to send meta results


  • false to not send meta results (default)


Default value

  gwen {
rp {
send {
meta = false
}
}
}
gwen.rp.send.stepDefs

Controls how StepDefs are sent to Report Portal.

Supported values

  • inlined to inline StepDefs as log messages


  • nested to nest StepDefs as report items


  • none to not send StepDefs (default)

Default value

  gwen {
rp {
send {
stepDefs = "none"
}
}
}
gwen.rp.send.failed.stepDefs

Controls how StepDefs are sent to Report Portal.

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 items


  • none to not send failed StepDefs

Default value

  gwen {
rp {
send {
failed {
stepDefs = "inlined"
}
}
}
}
gwen.rp.send.failed.errorTrace

Controls how error traces are sent to Report Portal.

Supported values

  • attached to log error traces as attachments


  • inlined to inline error traces as log messages


  • none to not send error traces (default)

Default value

  gwen {
rp {
send {
failed {
errorTrace = "none"
}
}
}
}
gwen.rp.send.failed.envTrace

Controls how environment traces are sent to Report Portal.

Supported values

  • attached to log environment traces as attachments


  • inlined to inline environment traces as log messages


  • none to not send environment traces (default)

Default value

  gwen {
rp {
send {
failed {
envTrace = "none"
}
}
}
}
gwen.rp.send.failed.hierarchy

Controls how call trace hierarchies are sent to Report Portal.

Supported values

  • attached to log call trace hierarchies as attachments


  • inlined to inline call trace hierarchies as log messages (default)


  • none to not send call trace hierarchies

Default value

  gwen {
rp {
send {
failed {
hierarchy = "inlined"
}
}
}
}
gwen.rp.send.breadcrumbs

Controls whether or not to send breadcrumbs to Report Portal.

Supported values

  • true to send breadcrumbs


  • false to not send breadcrumbs (default)

Default value

  gwen {
rp {
send {
breadcrumbs = false
}
}
}
gwen.rp.send.failed.errorBlocks

Controls how to send error blocks (highlights) to failed steps.

Supported values

  • all to send error blocks to all steps in a failed call trace


  • leaf to send error blocks to failed steps only (leaf nodes)


  • none to not send error blocks (default)


Default value

  gwen {
rp {
send {
failed {
errorBlocks = "none"
}
}
}
}
gwen.rp.send.tags

Controls whether or not to send tags to Report Portal.

Tags are arbitrary labels on a feature or scenario, e.g: @Todo, @Wip, @UAT

Supported values

  • true to send tags (default)


  • false to not send tags

Default value

  gwen {
rp {
send {
tags = true
}
}
}
gwen.rp.send.annotations

Controls whether or not to send annotations to Report Portal.

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 annotations
  • false to not send annotations (default)

Default value

  gwen {
rp {
send {
annotations = false
}
}
}
gwen.rp.send.markdownBlocks

Controls whether or not to log all inlined steps in markdown blocks.

Supported values

  • true to log inlined steps in markdown blocks (default)


  • false to not log inlined steps in markdown blocks

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)

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

Default value

  gwen {
rp {
heartbeat {
enabled = true
}
}
}
gwen.rp.heartbeat.timeoutSecs

Controls how long to wait for a heartbeat response before timing out.

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.

Default value

  gwen {
rp {
heartbeat {
timeoutSecs = 3
}
}
}
gwen.rp.testCaseId.keys

Controls how Report Portal test case IDs are generated.

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 parameters
  • auto to use the default automatic test case ID generation mechanism of the client-java RP library (codeRef + 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.

Supported values

  • true to log debug messages in Report Portal


  • false to not log debug messages in Report Portal (default)

Default value

  gwen {
rp {
debug = false
}
}