zerocode
zerocode copied to clipboard
Ability to write a message to HTML report
In the Zerocode Interactive Report noticed that if a test is passed there is no request body posted but is present when a test is failed. Need a way to print the request/response body or any custom text onto the Passed Report as well from a test step? This forms the test evidence for auditing that the correct data was posted/received
Perhaps something like a keyword called "print2html" or just "print"
"print2html": "Some message"
"print2html": "${somevariable}"
"print2html": "${abc.request.body}"
etc.
Hi @johnc2017 is the issue still available I would like to work on it.
@2022H1030042G , you can introduce a "meta" section to the core "scenario->step" and have the below provision inside the "step".
"print2html": "Some message"
"print2html": "${somevariable}"
"print2html": "${abc.request.body}"
etc.
That might do the job.
@nirmalchandra , where exactly do I have to make these changes?
@2022H1030042G , into the DSL section, you can add the above lines e.g.
{
"scenario": {
"steps": [
//... do nothing
],
// Add this extra section so that the report is amended with the extra information from the "meta" section.
"meta": {
"print2html": "Some message",
"print2html": "${somevariable}",
"print2html": "${abc.request.body}"
}
}
}
I think this way we can keep this section optional.
But in case of doubts or if it can be done differently, please collaborate/discuss with the developer/tester who raised this issue. There could be a better solution possible to suit the requirement.
@sparrowV @johnc2017 @nirmalchandra what I mean is where in the repository (under which folder/file) , do I have to make the changes?