F# 如何获得天篷';什么是LiveHtmlReporter?
我正在进行演示演示,我正试图让LiveHtmlReporter正常工作,但没有成功。到目前为止,我已经能够让它打开一个显示模板的浏览器,并将报告保存到磁盘,但报告从未随测试运行的结果更新。浏览器和保存的报告都包含默认的F# 如何获得天篷';什么是LiveHtmlReporter?,f#,canopy-web-testing,F#,Canopy Web Testing,我正在进行演示演示,我正试图让LiveHtmlReporter正常工作,但没有成功。到目前为止,我已经能够让它打开一个显示模板的浏览器,并将报告保存到磁盘,但报告从未随测试运行的结果更新。浏览器和保存的报告都包含默认的0通过0失败0 Todo 0跳过。控制台运行程序显示 0 minutes 3 seconds to execute 2 passed 0 failed Not saving report Not saving report 我有以下代码 open types open confi
0通过0失败0 Todo 0跳过
。控制台运行程序显示
0 minutes 3 seconds to execute
2 passed
0 failed
Not saving report
Not saving report
我有以下代码
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
开放类型
开放式配置
公开记者
记者IReporter
让liveHtmlReporter=reporter:?>liveHtmlReporter
liveHtmlReporter.reportTemplateUrl
报告员IReporter
让liveHtmlReporter=reporter:?>liveHtmlReporter
抱歉,我之前没有看到这个。我认为存在一个bug,如果不定义上下文,它将无法工作。尝试在测试定义上方添加“上下文”测试,看看是否有效。您还可以查看源代码,有一套测试使用reporter,看看它是否适合您。
reporter <- new LiveHtmlReporter(Chrome, configuration.chromeDir) :> IReporter
let liveHtmlReporter = reporter :?> LiveHtmlReporter
liveHtmlReporter.reportPath <- Some "reports/AutomationResults"