email2vimalraj / CucumberExtentReporter

A plugin to generate the cucumber jvm custom html report using ExtentsReport
http://www.vimalselvam.com/cucumber-extent-reporter/
MIT License
58 stars 74 forks source link

How to add reporting steps to utility classes other than step definition ones #79

Closed ankitagupta0909 closed 6 years ago

ankitagupta0909 commented 6 years ago

Reporter.addStepLog can be used inside any of the step definition classes and the step will be reported in the html report. However, if same step is used in any other utility class (common methods) then those steps are not captured.

Is there a functionality to do this?

email2vimalraj commented 6 years ago

@ankitagupta0909 : You can use Reporter.setTestRunnerOutput("Sample test runner output message"); to log a message from anywhere. Please note that this log will not be attached to your scenario or step and will be logged under the TestRunner output tab in the report.