Forum Discussion
- CharlesHaroldOccasional Contributor
Using a groovy assert statement, anything after the colon is printed when the assertion fails.
So, in a Groovy Step (where "testRunner" is available:
String expected = "Bob" ;
String actual = "Alan" ;
assert actual == expected : testRunner.testCase.name + ": Actual does not match Expected" ;And in a Script Assertions in a an Assertion Step (where only "context" is available):
String expected = "Bob" ;
String actual = "Alan" ;
assert actual == expected : context.testCase.name + ": Actual does not match Expected" ; - nmraoChampion Level 2678,
Can you please check this thread:
https://stackoverflow.com/questions/41700437/creating-a-test-report-from-project-level-tear-down-script/41759553#41759553
Related Content
Recent Discussions
- 2 days ago
- 5 days ago
- 16 days ago