0

I am trying to add version information which is displayed in the login page to the serenity report index.html. The version information is captured in LoginPage.java. I see that I can use @Step method to include customized statements in the report. Can someone please give me some details on how to use the @Step feature to include the message in index.html? I am just starting to use serenity-bdd framework, So any help in this regard is greatly appreciated.

Thanks in advance!!

Tester_Cary
  • 39
  • 2
  • 8

2 Answers2

0

Did you mean this:

String first = "param1";
String second = "param2";

@Step("Test step with parameters: {0} and {1}.")
public void testStep(String first, String second)
// method body...

Report will display it as:

Test step with parameters: param1 and param2.

Otherwise, if you don't provide the {0} and {1}, it will look like this:

String first = "param1";
String second = "param2";

@Step("Test step with parameters")
public void testStep(String first, String second)
// method body...

Test step with parameters: param1, param2

JDelorean
  • 631
  • 13
  • 26
0

We can use the following statement to print version information in the report:

String version = "3.4.12";
Serenity.recordReportData().withTitle("Version").andContents(version);
Niklas Mohrin
  • 1,756
  • 7
  • 23
Rita
  • 1
  • 1