JMeter写入文件脚本正在复制打印 [英] JMeter Write to file script is duplicating print

查看:101
本文介绍了JMeter写入文件脚本正在复制打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在生成CSV时遇到问题,它重复或重复了打印过程.

I'm having a problem with the CSV generated, it duplicates or iterates the process of printing.

打印为CSV的代码:

CSV文件生成且记录为空:

CSV file generate with null record:

它显示为值PASSEDnull,我只期望值为PASSED.

It shows to values PASSED and null, I'm only expecting the value with PASSED.

不知道null值的来源,同样在Debug Sampler中,消息变量仅包含PASSED,没有看到任何null.

Don't know where the null value came from, also in the Debug Sampler the message variable only contains PASSED , did not see any null .

推荐答案

当对特定采样器使用后处理器时,请确保将其放在采样器下仅执行一次,否则可以对其层次结构中的其他采样器执行您不会期望的

When you use post processor for specific sampler, make sure it will execute only once by putting it under the Sampler, otherwise it can execute for other samplers in its hierarchy which you will not expect

如果希望它在声明后执行,请在Sampler之后更改为Beanshell/JSR223 Sampler,以便在所有声明后执行一次.

If you want it to execute after assertions, change to Beanshell/JSR223 Sampler after your Sampler so it will be executed once after all assertions.

请参阅JMetet的执行顺序:

See JMetet's Execution order:

..采样器

..Sampler

后处理器>(除非SampleResult为null)

Post-Processors> (unless SampleResult is null)

断言(除非SampleResult为null).

Assertions (unless SampleResult is null)..

这篇关于JMeter写入文件脚本正在复制打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆