Skip to main content

Report Portal

Gwen provides seamless integration with Report Portal for centralised reporting and analytics.

Configure connection#

Configure the following Report Portal properties in your Gwen settings:

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 desired launch name
  • <project> is your desired project name

Example

To connect to a local docker instance:

rp.endpoint = http://localhost:8080rp.uuid = 12a345b6-7c8d-9012-e3f4-567890a1b23crp.launch = Gwenrp.project = default_personal

Log results to Report Portal#

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.

To send results to Report Portal only

./gwen -b -f rp features/todo

To generate HTML reports and send results to Report Portal

./gwen -b -r output/reports -f html,rp features/todo

Output

  • The results of all evaluated Gherkin nodes will be sent to your Report Portal server.
  • The HTML report will be generated at output/reports/index.html.

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 CLI system property. This will work as expected only when launching Gwen consecutively on the same machine. You would otherwise need to specifically target the last launch as described next.

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> CLI system property. This will work as expected 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

Gwen specific settings#

In addition to the standard Report Portal configuration, you can also configure the following Gwen settings to control more 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 value: false
  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 value: none
  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
  • nested to nest failed StepDefs as report items
  • none to not send failed StepDefs
Default value: inlined
  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 value: none
  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 value: none
  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
  • none to not send call trace hierarchies
Default value: inlined
  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 value: false
  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 value: none
  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
  • false to not send tags
Default value: true
  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 value: false
  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
  • false to not log inlined steps in markdown blocks
Default value: true
  gwen.rp.send.markdownBlocks = true
gwen.rp.heartbeat

Controls whether or not to enable heartbeats to monitor the health status of your report portal server during execution.

Supported values

  • true to enable heartbeats
    • Gwen will send a HTTP GET request to the Report Portal health endpoint before executing the first step in each Scenario and fail fast if a non 200 response or bad health status is returned.
  • false to disable heartbeats
Default value: true
  gwen.rp.heartbeat = true
gwen.rp.heartbeat.timeoutSecs

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

Only honoured when gwen.rp.heartbeat = true

Supported values

  • A positive integer denoting the number of seconds to wait for a heartbeat response before timing out.
    • If the connection cannot be established within the set timeout period, then Gwen will fail fast and report a timeout error.
  • true to disable heartbeats
Default value: 3
  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
  • 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: nodePath+params
  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 value: false
  gwen.rp.debug = false