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

Save HTML reports #97

Closed
AlexeyRaga opened this issue Sep 3, 2013 · 3 comments
Closed

Save HTML reports #97

AlexeyRaga opened this issue Sep 3, 2013 · 3 comments

Comments

@AlexeyRaga
Copy link

Is there a way to store HTML reports in a file system in order to make the results available when tests are finished?

It also would be helpful to be able to customize the template, perhaps to load the template from the local file (currently "http://lefthandedgoat.github.com/canopy/reporttemplate.html" is hardcoded as far as I can see).

lefthandedgoat added a commit that referenced this issue Sep 3, 2013
@lefthandedgoat
Copy link
Owner

Both of these are addressed in 0.8.2 which is now available on nuget.

I opened up several methds on LiveHtmlReporter, so you have to cast to get to them. You can now call the browser that holds the report and do anything you like, set the reportPath to a customized url, run javascript against the browser, grab the reportHtml as a string with reprotHtml() method, and simply save it with saveReport path fileName method.

Examples:

let liveHtmlReporter = reporter :?> LiveHtmlReporter
liveHtmlReporter.browser
liveHtmlReporter.reportPath <- @"http://www.mysite.com"
let allHtml = liveHtmlReporter.js "return $().html();"
let allHtml2 = liveHtmlReporter.reportHtml()
liveHtmlReporter.saveReportHtml @"c:\" "report"

@lefthandedgoat
Copy link
Owner

Wanted to let you know that the API changed a little bit in this pull request: KevM@e703b33

reportPath is now an optional path that will be used and auto export on quit() when using LiveHtmlReporter
The property for pointing to a url for your report is now called reportTemplateUrl
Sorry if this causes any inconveniences.

@AlexeyRaga
Copy link
Author

That's great, thank you very much!

Best Regards,
Alexey Raga

On Thu, Sep 5, 2013 at 11:22 AM, lefthandedgoat [email protected]:

Wanted to let you know that the API changed a little bit in this pull
request: KevM/canopy@e703b33KevM@e703b33

reportPath is now an optional path that will be used and auto export on
quit() when using LiveHtmlReporter
The property for pointing to a url for your report is now called
reportTemplateUrl
Sorry if this causes any inconveniences.


Reply to this email directly or view it on GitHubhttps://github.com//issues/97#issuecomment-23838169
.

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