unit-testing - 如何使用 mocha-junit-reporter 打印失败的测试
问题描述
我正在使用 mochajs 和 mocha-juint-reporter。
这是我正在运行的命令:
"test:junit": "mocha test --recursive --reporter mocha-junit-reporter --reporter-options mochaFile=./reports/junit/unit-test-results.xml --reporter-options outputs=false --reporter-options includePending=true",
它运行正常,并生成以下报告:
<?xml version="1.0" encoding="UTF-8">
<version>1.0</version>
</?xml>
<0 name="Mocha Tests" time="0.3600" tests="2442" failures="1" skipped="25">
<name>Mocha Tests</name>
</0>
如何让它在报告中包含失败的测试?我尝试了几种记者选项,但似乎没有任何效果。
我原以为输出失败的测试是标准的
提前致谢!
解决方案
推荐阅读
- php - 我正在尝试将多个图像下载为 zip 文件,但使用 laravel 7 时出错
- php - 从多行数组中获取单个表格行
- python - 为什么在下面的 PYTHON 3 草图中存在索引错误列表超出范围?谢谢
- javascript - 将坐标系应用于 3D 模型
- python - 问:AttributeError:模块“时间”没有属性“时钟”
- c# - 如何将平面模型映射到具有字符串属性和 IEnumerable 的类
使用自动映射器 - c# - 在 C# 中将一个对象分配给类的问题
- python - Arduino ide 上的“Nan”输出
- python - 如何在网页抓取中使用 br 标签以获得更好的输出?
- python - 使用 Python 读取二进制文件(fwrite C 输出)