How to make Canopy LiveHtmlReporter work?

I am working on a demonstration of a Canopy demo and I am trying to get LiveHtmlReporter to work, but was not successful. So far, I managed to open a browser that displays the template and save the report to disk, but the report is never updated with the results of the test run. Both browsers and the saved report contain by default 0 Passed 0 Failed 0 Todo 0 Skipped. Console display shows

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 suppose I missed something simple, but I'm not familiar enough with Canopy or F # to determine what I am missing.

+4
source share
1 answer

There is a similar question.

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

Source: https://habr.com/ru/post/1546688/


All Articles