Read Excel file with CSV Data Set Config Element - jmeter

I'm building a project on JMeter and I would like to read an Excel file with CSV Data Set Config to avoid to use Groovy to read it.
Do you know if it is possible? If not, any other JMeter element can help me to read Excel file row by row?
Many thanks in advance,
Best regards,

CSV Data Set Config is only able to read text files, as per Wikipedia:
A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values.
If your data file is a binary file like .xls or .xslx unfortunately CSV Data Set Config won't help, you have the following options:
Export .xls or .xlsx file to CSV using MS Excel or equivalent
If for any reason you cannot use point 1 you can go for Apache POI libraries to read the Excel file formats in JSR223 Test Elements like it's described in How to Implement Data Driven Testing in your JMeter Test article.
You can also see Busy Developers' Guide to HSSF and XSSF Features for some code snippets for popular user scenarios when it comes to reading/writing data from/to Excel files

Related

JMeter- Reading One row of CSV file to Multiple rows of another csv file

How can I loop one csv file to another csv file in JMeter, where the first csv file contains all the login data and the other csv file contains the transaction data. I am supposed to run where 1 teller should process 30 transaction.
Go for __CSVRead() function.
You will not be able to use CSV Data Set Config as it is a Configuration Element and according to the JMeter Test Elements Execution Order all the configuration elements are being initialised at the very beginning of the test while your requirement is to read data based on user dynamically.
Check out How to Pick Different CSV Files at JMeter Runtime article for comprehensive information on using __CSVRead() function

How do I read data from excel using CAPL

I am trying to read data from Excel sheet which consists of Request and Response, signals with values in CAPL.
How to read from Excel sheet through CAPL scripting?
Only if you save your excel in a csv format. You cannot open xlsx through CAPL.
When you have a csv file, you can read it with the CAPLs regular file operation functions :
openFileRead();
About their usage you will find plenty documentation in Help.

how to read different sheets in a csv file using jmeter?

Am maintaining the data in different sheets in a csv file,but now i wanted to read this through jmeter .
i know how to read single csv file in jmeter , so need help to read different sheets in a single csv file.
Can anyone please help to get solution for this ?
Jmeter only reads CSV so you would need to save each sheet as CSV.
You could try otherwise with a setup Thread group and custom code (Beanshell or JSR223) that takes this excel and extracts each sheet into a CSV file.
CSV file is not created for that : CSV file should contains only one sheet.
As #PMD UBIK-INGENIERIE suggests, export every sheet to an other csv file.

Kettle: load CSV file which contains multiple data tables

I'm trying to import data from a csv file which, unfortunately, contains multiple data tables. Actually, it's not really a pure csv file.
It contains a header field with some metadata and then the actual csv data parts are separated by:
//-------------
Table <table_nr>;;;;
An example file looks as follows:
Summary;;
Reporting Date;29/05/2013;12:36:18
Report Name;xyz
Reporting Period From;20/05/2013;00:00:00
Reporting Period To;26/05/2013;23:59:59
//-------------
Table 1;;;;
header1;header2;header3;header4;header5
string_aw;0;0;0;0
string_ax;1;1;1;0
string_ay;1;2;0;1
string_az;0;0;0;0
TOTAL;2;3;1;1
//-------------
Table 2;;;
header1;header2;header3;header4
string_bv;2;2;2
string_bw;3;2;3
string_bx;1;1;1
string_by;1;1;1
string_bz;0;0;0
What would be the best way to process load such data using kettle?
Is there a way to split this file into the header and csv data parts and then process each of them as separate inputs?
Thanks in advance for any hints and tips.
Best,
Haes.
I don't think there are any steps that will really help you with data in such a format. You probably need to do some preprocessing before bringing your data into a CSV step. You could still do this in your job, though, by calling out to the shell and executing a command there first, like maybe an awk script to split up the file into its component files and then load those files via the normal Kettle pattern.

JMeter export graph to CSV exports to multiple columns, write results to file exports to one column

I was annoyed with JMeter writing data results to CSV as one column. So when the CSV file was opened in Excel all values would be added to one single column (which requires annoying manual copy/paste work to get to graphs). I then noticed that if I choose Export to CSV on a Listener graph, it actually exports the CSV file as separate columns in Excel, which is great.
Is it possible to have the "Write results to file" write data into separate columns by default as it does with the graph "Export to CSV"? Thanks!
Suppose you have at least 2 options:
Simple Data Writer, which one you are using at the moment, as you understand.
In jmeter.properties file (JMETER_HOME\bin\jmeter.properties) uncomment and set jmeter.save.saveservice.default_delimiter=; to use ';' instead of ',' (used by default) as separator in csv-files (which one you are creating using "Write results to file") - this will separate values in different columns if opened in Excel.
# For use with Comma-separated value (CSV) files or other formats
# where the fields' values are separated by specified delimiters.
jmeter.save.saveservice.default_delimiter=;
Flexible File Writer from jmeter-plugins pack implments the same functionality and looks to be more customizable.
Idea is the same as above - use ";" to separate values written into file:
Write file header: endTimeMillis;responseTime;latency;sentBytes;receivedBytes;isSuccessful;responseCode
Record each sample as: endTimeMillis|;|responseTime|;|latency|;|sentBytes|;|receivedBytes|;|isSuccessful|;|responseCode|\r\n
Hope this helps.

Resources