jmeter - aritmetic operation of csv data config value in jmeter
问题描述
I use jmeter data set config to read data from csv file. But I want to convert int to these values. For example in csv data set config there are 1,2,3,4,5. I use as ${variable}+1 or 2*${variable}%10
解决方案
You can add a JSR223 PreProcessor before the HTTP Request and do some operations there to modify the values:
int newValue = vars.get("variable").toInteger() + 1; OR
int newValue = ${variable} + 1; AND THEN
vars.put("variable", newValue);
推荐阅读
- node.js - 如何将命令行参数传递给反应程序?
- qt - 无法为 LiteIDE 设置 QTDIR 环境变量
- rx-java - Rxjava `2.x` 抛出异常时崩溃
- mongodb - Mongodb聚合从数组中获取所需的对象
- javascript - Mermaid.js 与框宽切割文本有关的问题
- python - 在饼图python上显示百分比
- c# - cshtml 和 cshtml.cs 部署后不起作用
- python - 我在链表中添加了4个元素,但是为什么只显示了三个而没有打印最后一个元素
- go - 如何解析用逗号分隔但不被数组包围的json对象字符串
- android - 使用 Android 中的 HttpUrlConnection 类在对 Django 服务器的 HTTP POST 请求中包含 CSRF 令牌