F#机盖-如何使用LiveHtmlReporter? [英] F# canopy - how to use LiveHtmlReporter?

查看:120
本文介绍了F#机盖-如何使用LiveHtmlReporter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取F#和顶篷以将测试记录在html文件中.

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

这对我不起作用.我设法通过使用Chrome启动LiveHtmlReporter.现在,我正在努力使其在测试完成后保存报告.

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.

当我尝试使用时:

reporter <- new LiveHtmlReporter(Chrome, "C:\\") :> IReporter
let liveHtmlReporter = reporter :?> LiveHtmlReporter
liveHtmlReporter.saveReportHtml @"C:\" "report"

在进行测试之前,它向我抛出InvalidOperationException是未处理的错误,并且不保存任何内容.除此之外,当测试运行时-我只能看到上下文标题,而没有打印测试名称-只是通过或失败而没有测试名称.

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?

推荐答案

我遇到了同样的问题.这应该有帮助.

I had the same problem. This should help.

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

这篇关于F#机盖-如何使用LiveHtmlReporter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆