Reputation: 21
I am trying to get F# and canopy to log tests in html files.
So here it says that all I need to do is:
open configuration
open reporters
reporter <- new LiveHtmlReporter() :> IReporter
This didn't work for me. I managed to start the LiveHtmlReporter by using Chrome to start it. Now I am struggling to make it save the reports after tests are finished.
When I try to use:
reporter <- new LiveHtmlReporter(Chrome, "C:\\") :> IReporter
let liveHtmlReporter = reporter :?> LiveHtmlReporter
liveHtmlReporter.saveReportHtml @"C:\" "report"
It throws an InvalidOperationException was unhandled error at me before it get to the tests and doesn't save anything. Besides that, when the tests run - I can see only context titles, and test names are not printed - just Pass or Fail without test name.
Another thing is taking screenshot on error - it also doesn't happen.
I think I am doing wrong at the very bottom of my code. What is going wrong?
Upvotes: 0
Views: 385
Reputation: 11
I had the same problem. This should help.
reporter <- new LiveHtmlReporter(Chrome, configuration.chromeDir) :> IReporter
let liveHtmlReporter = reporter :?> LiveHtmlReporter
liveHtmlReporter.reportPath <- Some "reports/AutomationResults"
Upvotes: 0