简体   繁体   中英

How to execute unbalanced dataset in JMeter

I have following dataset. I want to do a load test in JMeter with this csv file. But I cannot read the file because all the columns are not filled with data. How do I write the code for that in JMeter?

Dataset: 在此处输入图像描述

This is the code I wrote so far:

function getstr(){ var str= ${soccd1}+","+${soccd2}+","+${soccd3};

在此处输入图像描述

If you have a test.csv file like this:

A,B,C
A1,B1,C1,
A2,,C2
,B3,C3

Or if you prefer screenshots from Excel:

在此处输入图像描述

If you setup CSV Data Set Config like this:

在此处输入图像描述

It will normally read the data, when there is nothing in the "cell" the relevant JMeter Variable will just be empty. You can observer JMeter Variables (and properties) with their respective values using Debug Sampler

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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