简体   繁体   English

如何为Jmeter Junit采样器创建更详细的结果消息

[英]How do I create more verbose result messaging for a Jmeter Junit Sampler

I've noticed that when I run a Junit sampler with Jmeter, the messaging is pretty bare. 我注意到当我使用Jmeter运行Junit采样器时,消息传递非常简单。 If an exception occurs, Jmeter will report it, but everything else that happens in my tests has to get outputted using Log4J or another logging tool. 如果发生异常,Jmeter将报告它,但我的测试中发生的所有其他事情都必须使用Log4J或其他记录工具输出。 Is there a way just to log result back to Jmeter? 有没有办法将结果记录回Jmeter? Do they have an API for this? 他们有这个API吗?

Have you looked into the simple data writer as an option? 您是否考虑过将简单数据编写器作为选项?

You could also do a BeanShell script to parse and write results to a file. 您还可以执行BeanShell脚本来解析结果并将结果写入文件。

You can append the assertion results to a log file. 您可以将断言结果附加到日志文件中。

  1. Check on "Append assertion errors" and "Append runtime exceptions" 检查“附加断言错误”和“追加运行时异常”
  2. Add listener "View Results in Table" 添加侦听器“在表中查看结果”
  3. Specifya file name and check on "Errors" in "Write results to file/ Read from file" section. 指定文件名并检查“将结果写入文件/从文件读取”部分中的“错误”。 YOu could also click "Configure" button to add more information to the output file. 你也可以点击“配置”按钮将更多信息添加到输出文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM