Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report path #63

Closed
Suganthi06 opened this issue Jan 12, 2018 · 9 comments
Closed

report path #63

Suganthi06 opened this issue Jan 12, 2018 · 9 comments

Comments

@Suganthi06
Copy link

When I use the code examples in my jruby project, the reports are getting generated successfully.
However, it is generated only at the project root directory and not in the path that I specify.

When I specify a particular path for the report to get generated, I see
RuntimeError: Error:: No file(s) found at ... (at the project root directory)

@rajatthareja
Copy link
Owner

@Suganthi06
Please provide more details JRuby version, gem version, sample code etc...

@Suganthi06
Copy link
Author

JRuby version - 9.1.15.0
ReportBuilder gem version - 1.4

Code:
at_exit do
ReportBuilder.configure do |config|
config.json_path = '<project_folder/reports_folder/>report'
config.report_path = '<project_folder/reports_folder/>report'
config.report_types = [:json, :html]
config.report_title = 'Automation Test Results'
config.include_images = false
end
ReportBuilder.build_report
end

RuntimeError: Error:: No file(s) found at <project_folder/reports_folder/>report
get_groups at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/report_builder-1.4/lib/report_builder/builder.rb:98
build_report at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/report_builder-1.4/lib/report_builder/builder.rb:28
build_report at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/report_builder-1.4/lib/report_builder.rb:61

@rajatthareja
Copy link
Owner

config.json_path = '<project_folder/reports_folder/>report'

Your JSON report files generated by cucumber are in '<project_folder/reports_folder/>report' ?

@Suganthi06
Copy link
Author

JSON and HTML report gives me the same error if I change the path.

@rajatthareja
Copy link
Owner

rajatthareja commented Jan 23, 2018

@Suganthi06

config.json_path is input JSON path not output JSON path.

You haven't answered my question. Are you sure your input JSON report files are in '<project_folder/reports_folder/>report' ?

Please answer my question if you want me to help you or read the doc carefully.

@Suganthi06
Copy link
Author

Suganthi06 commented Jan 23, 2018

input json file is also throwing the same error if i change the path. if i don't change the path, html is not finding the json that has been created in '<project_folder/>report.json'.

it works only if both the paths are '<project_folder/>report'.

@rajatthareja
Copy link
Owner

Try this

config.json_path = '<project_folder/>report'
config.report_path = '<project_folder/reports_folder/>report'

@Suganthi06
Copy link
Author

Suganthi06 commented Jan 23, 2018

Thank you !
It worked fine.
Another issue is, without a pre-existing json file anywhere in the project, both the json and html file won't get created. (same error).

@Suganthi06
Copy link
Author

Suganthi06 commented Jan 30, 2018

Working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants