0

I am trying to add the application version number that is displayed in the login page in the serenity report. Currently I am just capturing it in the code and printing in the console. Is there anyway the console output can be included in the serenity index.html

Tester_Cary
  • 39
  • 2
  • 8

2 Answers2

1

Take a look at the following property of Serenity:

serenity.project.name

It displays a project name in the top-right corner of the test case report (not the main Serenity page though). I have not tried this, but you might override that property each time you run prior to when Serenity kicks in. Here's what it would look like:

enter image description here

Alternatively, you could provide a final String with version to a test case tag, e.g. with @WithTag or @WithTags or @WithTagValuesOf annotations. Example:

final String version = "1.0";

// ...

@Test
@WithTagValuesOf({ "version:" + version })
// test method here

Result:

enter image description here

Hope you will find this useful.

JDelorean
  • 631
  • 13
  • 26
1

In your serenity.properties file you can add:

report.customfields.ApplicationVersion = 1.2.3

This will appear on your html summary report towards the top as a custom title, with the version you have specified.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Iphiclus
  • 264
  • 3
  • 8