Hamman359
Hamman359

Reputation: 1052

How do I get Canopy's LiveHtmlReporter to work?

I'm working on a presentation demoing Canopy and I am trying to get the LiveHtmlReporter to work, but have not been successful. So far, I've been able to get it to open a browser that displays the Template and to save the report to disk, but the report never updates with the results of the test run. Both the browser and the saved report contain the default 0 Passed 0 Failed 0 Todo 0 Skipped. The console runner displays

0 minutes 3 seconds to execute
2 passed
0 failed
Not saving report
Not saving report

I have the following code

open types
open configuration
open reporters

reporter <- new LiveHtmlReporter(Firefox) :> IReporter

let liveHtmlReporter = reporter :?> LiveHtmlReporter
liveHtmlReporter.reportTemplateUrl <- @"http://localhost:56295/content/reporttemplate.html"
liveHtmlReporter.saveReportHtml @"C:\Code\CanopyDemo\" "report"

// Code for actual tests here 

I figure I'm missing something simple, but I'm not familiar enough with either Canopy or F# yet to spot what I'm missing.

Upvotes: 4

Views: 522

Answers (1)

Yerassyl Shalabayev
Yerassyl Shalabayev

Reputation: 11

There is similar question

reporter <- new LiveHtmlReporter(Chrome, configuration.chromeDir) :> IReporter
let liveHtmlReporter = reporter :?> LiveHtmlReporter
liveHtmlReporter.reportPath <- Some "reports/AutomationResults"

Upvotes: 1

Related Questions