Is it possible to generate cucumber html reports with only scenario titles with out steps -
is possible generate cucumber html reports scenario titles out steps?
i looking generate html report email,but want reports generated scenarios title, report not huge , easy know scenarios failed.
i sure may have solution this.can ony 1 please share or give me idea how done.
thanks in advance
you need build custom formatter. cucumber wiki has details on doing this.
to hide steps, can create custom formatter overrides html formatter's before_step_result , build_step methods.
if support folder create .rb file with:
require 'cucumber/formatter/html' module cucumber module formatter class htmlstepless < html def before_step_result(step_result) #todo: used for? @step_match = step_result.step_match @hide_this_step = true if step_result.exception if @exceptions.include?(step_result.exception) @hide_this_step = true return end @exceptions << step_result.exception end if step_result.status != :failed && @in_background ^ step_result.background @hide_this_step = true return end @status = step_result.status return if @hide_this_step set_scenario_color(step_result.status) @builder << "<li id='#{@step_id}' class='step #{step_result.status}'>" end def build_step(keyword, step_match, status) # nothing end end end end when run cucumber, tell use custom formatter:
cucumber -f cucumber::formatter::htmlstepless -o output.htm
Comments
Post a Comment