【问题标题】:Testcafe reporting own stackTestcafe 报告自己的堆栈
【发布时间】:2020-03-12 08:28:35
【问题描述】:

我在我的项目中使用 testcafe 和 allure 记者。一切正常。现在我编写了一个自定义函数,用于比较 XML 文件。结果是一个具有不同节点的数组。现在我想将此数组作为堆栈包含在报告中。我看到有一个

        var errorMsg = {
            name: msgContent.data,
            message: msgContent.message,
            stack: msgContent.stack
        };

里面的魅力记者。我可以使用 .expect 断言发送自己的消息。但是如果发生错误,我如何发送自己的堆栈呢?

【问题讨论】:

  • 您能否分享有关您的方案的更多详细信息?将您的节点数组与空数组 .expect(yourArray).eql([]); 进行比较是否适合您?
  • 这个断言只会告诉你数组不是 [] AssertionError: XML Vergleich fehlgeschlagen: expected [ Array(101) ] to deep equal [] 但我需要堆栈内的数组内容而不是失败的那一行。

标签: automation automated-tests reporting e2e-testing testcafe


【解决方案1】:

目前,TestCafe 不显示断言对象之间的差异。在 TestCafe 存储库中有一个建议 - https://github.com/DevExpress/testcafe/issues/4785。跟踪此问题以了解进度。

更新:在Adding detailed diffs中实现)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-18
    • 2011-03-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多