rajatthareja/ReportBuilder

Issue with html report generation after feature run

Closed this issue · 2 comments

I am facing issue with the html report generation. I have configured my application as per the steps specified on ReadMe.
Following is my configuration - created create_sample_reports.rb and placed in features/support folder

require 'report_builder'
ReportBuilder.configure do |config|
config.json_path = 'features/reports'
config.report_path = 'features/reports/report'
config.report_types = [:json, :html]
config.report_title = 'AK_Results'
config.additional_info = {Browser: 'browser', Environment: 'environment', MoreInfo: 'more info'}
end
ReportBuilder.build_report

The generated report.json is correct; however the report.html does not refer the latest json data.
Any help is appreciated.

the report.html does not refer the latest json data.

It sounds like the report builder is running before running the scenarios which would pick up the previous json. Try putting ReportBuilder.build_report in the at_exit hook like

at_exit do
  ReportBuilder.build_report
end

Thanks a lot @mascolim , you saved my Day !!!!!