我的项目未出现在Klov报告中

时间:2018-08-08 07:17:58

标签: c# reporting specflow extentreports

我使用以下代码行生成了klov报告:

public static void InitializeReporter()
{

    var klov = new KlovReporter();

    klov.InitMongoDbConnection("localhost", 27017);
    klov.ProjectName = "VplatesAutomationProjectTest";
    klov.ReportName = "Test" + DateTime.Now.ToString();
    klov.KlovUrl = "http://localhost";
}

mongodb命令提示符显示以下内容,没有任何错误或异常

2018-08-08T16:42:47.564+1000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:55217 #6 (3 connections now open)
2018-08-08T16:43:06.987+1000 I NETWORK  [conn6] end connection 127.0.0.1:55217 (2 connections now open)
2018-08-08T16:51:34.154+1000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:56209 #7 (3 connections now open)
2018-08-08T16:51:41.372+1000 I NETWORK  [conn7] end connection 127.0.0.1:56209 (2 connections now open)
2018-08-08T16:58:46.168+1000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:56935 #8 (3 connections now open)
2018-08-08T16:58:57.926+1000 I NETWORK  [conn8] end connection 127.0.0.1:56935 (2 connections now open)

当我在浏览器中点击localhost时,页面会打开,但是项目下拉列表中没有项目

1 个答案:

答案 0 :(得分:0)

尝试将klov定义为KlovReporter。 您还需要attachReporter,希望对您有所帮助:)

    KlovReporter klovReporter = new KlovReporter();
    klovReporter.initMongoDbConnection("172.0.0.1", 27017);
    klovReporter.setProjectName("ProjectName");
    klovReporter.setReportName("reportFileName");
    klovReporter.setKlovUrl("http://172.0.0.1");
    extent.attachReporter(klovReporter);