问题标签 [test-reporting]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - 引诱报告:引诱如何从不同的测试中保存/获取两个结果
我是 Allure 报告框架的新手,我正在(运行)两个测试,并从 TestNG 和 Jasmine Protractor 获得结果,一切正常。我的问题是 Allure 如何从两个测试中收集结果是使用数据库还是任何服务器或如何。所以我的公司想知道它实际工作的架构或它如何存储测试结果,因为公司需要长期拥有测试历史的时间。如果有人有任何答案,那将有所帮助。谢谢!
ruby - 来自 Rakefile 的黄瓜测试报告
我有一组 Ruby/Cucumber 测试。在 IDE 中运行时,所有测试都会成功运行。
当我使用此 CLI 命令执行测试时,测试会运行并生成测试报告。
$ cucumber --format progress --format html --out=features_report.html -r features --tags '@this or @that' features
我需要从 Rakefile 执行测试才能并行运行测试。我可以运行它们调用下面的 Rakefilerake local
但我无法弄清楚生成测试报告的额外选项/参数的去向。
如果我将 Rakefile 中的报告位分组,就像它们在工作 CLI 命令中一样
我收到此错误:
或者,如果我这样做"-o" "-t '@this or @that' --out first.html --format HTML",
我明白了:
生成测试报告的参数在 test_args 中的什么位置,它们是什么样的?
提前致谢。
maven - 如何在 maven-surefire-plugin XML 报告中为 junit 中的 @RepeatedTest 注释测试用例获取正确的重复值和包名称
我根据以下层次结构创建了一些 JUnit 测试用例。
包名例如:
test.qa.paramter.myTest
在这个包下,我有 2 个测试用例:
1:带有@Test注解的第一个测试用例(类名为NormalTest,方法名为caseNormalTest)
2:第二个测试用例(类名称为RepeatTest,方法名称为caseRepeatTest)与@RepeatedTest,它将使用不同的输入值重复相同的测试2次。
我的问题是如何获得与@RepeatedTest 相同的类名xml 输出,因为它不显示完整的包名。还有可能在万无一失的报告中获得重复计数吗?
现在,当我使用 Jenkins 运行测试用例时,maven-surefire-plugin 为 @RepeatedTest 生成测试结果 xml
而对于@Test annoation 我得到
下面是我的 POM 设置
python - 如何生成有用的 pytest-bdd 测试报告?
我正在使用 pytest-bdd 并希望生成一个测试报告,其中清楚地显示了 Given、When、Then 步骤,并且在失败的情况下,它会向您显示错误。
我已经安装pytest-html
并成功创建了一个报告,但它不支持 Given、When、Then 步骤。我也尝试使用该--cucumber-json
选项将报告输出为 json,但我不确定我能用它做什么。
引诱报告是我探索的另一种途径,但它需要在我想避免的步骤上进行额外的装饰,但也许这是最好/唯一的方法。
例如,类似于机器人框架测试报告的东西将是一个很好的开始!
azure-devops - 将外部测试结果导入 Azure DevOps
我试图弄清楚如何将我的外部测试结果导入 Azure DevOps。
本文介绍如何在同一管道中发布结果。但这对我没有帮助。我们确实使用 Azure 管道来构建和部署我们的解决方案,但测试是在此之后运行的(在已部署的环境中),因此,在管道之外。我们可以收集结果(以适合 Azure DevOps 的格式),并希望将其反馈到执行部署的 Azure DevOps 版本中。欢迎所有提示。
jenkins - In groovy script in jenkins test result how can we get information on skipped tests to show if test was expectedFailure(pass or fail) or Skipped?
The jenkins test result GUI shows skipped or expectedFail tests as skipped. The individual test view for skipped or expectedFail tests shows "Skipped Message" and "Standard Output"
e.g. "Skipped Message" can be:
a custom skip message
/li>- "expected test failure"
- "xfail-marked test passes unexpectedly"
We are using groovy script to generate test reports. We would like to include more information about skipped tests rather than just "skipped". How can we get info on the skipped test like in the "Skipped Message" in the GUI view?
The jenkins API is documented here:
https://javadoc.jenkins.io/plugin/junit/hudson/tasks/junit/TestResult.html
There is no specific call for getting information on the skipped or expectedFail tests. I am hoping with some experimentation that it will be possible to get expectedFail information through this testResult API. Starting with these API calls:
In the GUI:
- A normal passed test just has "Standard Output".
- A normal failed test has "Error Message" and "Stacktrace" and "Standard Output".
- A skipped or expectedFail tests shows "Skipped Message" and "Standard Output".
We are using python unittest outputting junit test result files. Loading that into jenkins using junit test result plugin.
Have I missed something in the jenkins test results API that would give more information on expected fail or skipped tests ? I hope to find the info through experimentation using the API. And document it in an answer here.
Here is the guts of test report groovy script (used in jenkins Execute Groovy Script plugin after jUnit result plugin has harvested test results):
reactjs - 我可以在不弹出的情况下将 Create React App Jest Testing 与测试报告器一起使用吗?
我想将我的笑话测试的结果输出到像JUnit这样的文件格式而不从反应脚本中弹出。
通过使用该--json
命令,我可以将其输出为 JSON,但我希望获得 Jenkins 可以默认处理的格式。
我似乎无法找到这是否受支持并且我不想从 Create React App 中弹出,还有其他方法吗?
java - Java 测试覆盖率工具仅报告已更改文件的覆盖率?
什么是仅报告Java 项目中更改文件的单元测试覆盖率的好工具(类似于 javascript 的 jest)?我们计划将此工具构建到工作场所 GitHub 上的每个拉取请求中!目前,我们每天都在生成 jacoco 测试报告,但需要一些可以在每个构建上运行的东西,以仅针对所做的更改。欣赏这些想法!
python - 如果测试用例失败,则将子流程的标准输出添加到 JSON 报告
我正在研究添加到由pytest-json
or生成的 JSON 报告的方法pytest-json-report
:我没有挂断任一插件。到目前为止,我已经使用pytest-json
. 因此,例如,JSON 对象有一个测试用例
这是来自我正在尝试的实验。在实践中,一些测试用例是通过产生一个子流程来完成的,Popen
并且断言是某个字符串出现在标准输出中。如果测试用例失败,我需要向包含该子进程的标准输出的调用字典添加一个键/值。到目前为止,我一直徒劳地尝试找到正确的固定装置或设备来完成此任务。似乎 pytest_exception_interact可能是要走的路,但到目前为止我还没有深入研究 JSON 结构。我需要做的就是在发生错误时添加/修改 JSON 结构。看来pytest_runtest_call太重了。
或者,有没有办法改变longrepr
上面的值?我一直无法找到正确的方法来做这些,现在是时候问了。