【问题标题】:My project is not appearing in the Klov report我的项目没有出现在 Klov 报告中
【发布时间】:2018-08-08 07:17:58
【问题描述】:

我使用以下代码行生成 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 时,页面打开,但项目中没有项目,选择下拉菜单

【问题讨论】:

  • 请发布完整的 Extent 代码。

标签: c# reporting specflow extentreports


【解决方案1】:

尝试将 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);

【讨论】:

  • 使用var klovReporter = new KlovReporter();没有区别
猜你喜欢
  • 1970-01-01
  • 2019-06-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-09-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多