rajatthareja / ReportBuilder

Ruby gem to merge Cucumber JSON reports and build mobile-friendly HTML Test Report, JSON report and retry file.
https://reportbuilder.rajatthareja.com
MIT License
81 stars 47 forks source link

json report - steps to use report_builder gem #68

Closed vipinmuralee closed 6 years ago

vipinmuralee commented 6 years ago

I have a json results generated in my ruby cucumber framework. let me know how to use the report_builder gem in my framework

C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/report_builder-1.7/lib/report_builder/builder.rb:81:in get_groups': Error:: No file(s) found at C:\RubyAutomation\Features\results\cucumber_json (RuntimeError) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/report_builder-1.7/lib/report_builder/builder.rb:22:inbuild_report' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/report_builder-1.7/lib/report_builder.rb:76:in build_report' from C:/RubyAutomation/Features/support/hooks.rb:48:inblock in <top (required)>'

vipinmuralee commented 6 years ago

hooks.rb

at_exit do

ReportBuilder.configure do |config| config.json_path = 'C:\RubyAutomation\Features\results\cucumber_json' config.report_path = 'C:\RubyAutomation\Features\results\report\report' config.report_types = [:retry, :html] config.report_title = 'My Test Results' config.additional_info = {browser: 'Chrome', environment: 'Stage 5'} end

ReportBuilder.build_report end

vipinmuralee commented 6 years ago

Fixed