Giter VIP home page Giter VIP logo

extended-csv-dataset-config's Introduction

Extended-csv-dataset-config

Introduction

This plugin provides additional feature over the JMeter's default CSV data set config element. This also provides additional parameterization feature.

This will enable LoadRunner users, the privilege of having similar parameter advantage in Apache JMeter

Preview

Extended CSV Dataset Config

Required Components

  1. Apache JMeter components
  2. Apache JMeter core

Jmeter Target

  • Jmeter version 5.2.1 or above
  • Java 8 or above

Installation Instructions

  • Download the source code from the GitHub.
  • Just do a mvn clean install (M2 is required)
  • Jar will be generated under the target directory (di-extended-csv-xx.jar).
  • Copy the Jar to <Jmeter Installed Directory>/lib/ext/

What's new ?

  • Improved new GUI
  • Added feature to create new file
  • Added feature to edit csv file with default text editor
  • Fixed quoted data issue
  • Fixed relative path issue
  • Support for large csv (Moved out of In-memory read)

Options

✨ This version eliminates remembering the below combination table ✨

This allows reading of CSV data as follows

  • Select Row (Sequential | Random | Unique)
  • Update Value (Each Iteration | Once)
  • When Out of Values (Continue Cyclic | Continue with last Value | Abort Thread)

The below table is the combinations allowed while using this plugin

Select Row Update value Out of Values Allocate Block Size
Sequential Each Iteration Continue Cyclic NA
Sequential Each Iteration Abort Thread NA
Sequential Each Iteration Continue with Last value NA
Sequential Once NA NA
Random Each Iteration NA NA
Random Once NA NA
Unique Each Iteration Continue with Last Value Enabled
Unique Each Iteration Continue Cyclic Enabled
Unique Each Iteration Abort Thread Enabled
Unique Once NA NA

Future Release in pipeline

  • Visualizing csv data in data table
  • Simulate Parameter window

References

  • CSV data set config

💲 Support Me

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

Please rate a star(:star2:) - If you like it.

Please open up a bug(:beetle:) - If you experience abnormalities.

extended-csv-dataset-config's People

Contributors

mi185051 avatar rollno748 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

extended-csv-dataset-config's Issues

相对路径读取参数化文件失败

image
image

jmx和csv文件在同一路径下,相对路径读取文件内容失败
错误信息:
java.lang.IllegalArgumentException: Could not read file header line for file userInfo.csv

The verion 2.0 (extended-csv-dataset-config-2.0) does not work with JMeter 5.5 or 5.6.2

Hello @rollno748 - The JMeter script which has the extended csv data set to any request in the script, does not open in JMeter and shows a dialog to install the plug-in first. Up on installing the plug-in "extended-csv-dataset-config-2.0" and restarting JMeter, it still does not open the script and shows the same message to install the plugin.

I am assuming JMeter is not detecting the installed plug-in "extended-csv-dataset-config-2.0" (still shows in available plug-ins tab of plug-in manager after installation too).

Note: I removed the jar file 2.0 from ext folder of lib directory and replaced with version 1.1 (di-extended-csv-1.1.jar) and it works fine.
So the problem is with version 2.0

Last Data Row is not getting used, instead 2nd last is reused

I was playing around with this today as I'm learning JMeter (but very familiar with LoadRunner) and glad to see something designed to handle the data like LR does, however I am encountering what appears to be a bug.

I setup a thread group with 3 threads and a loop count of 3. Initially I purposefully provided too few rows of data into the data file and wanted to see what it looked like when I altered the 'when out of values' but I noticed something strange, that my last row of data was not being reused, instead the 2nd last row was there twice.

So I updated the file to have exactly the number of rows needed (9 due to the 3x3) and tried again and still got the 2nd last row being reused. I did recall LR having an issue at one time if the data file didn't have a blank line, so tried with and without and still seeing same behavior. I ended up having to put 2 blank lines in my files end to get it to work. So there is a workaround I suppose, but in my mind It's a bug because I was using Unique and it reused a value. I varied the When out of values, and with abort thread i still got 2nd last row twice. I changed it to Continue cyclic and it was same, so based on this it doesn't seem to believe it's out of data (it's not).

For this example I'm just using a Java Request with the name - Java Request_${user}${password}${__threadNum}

And my CSV looks like:
user,password
jojo1,bean
jojo2,bean
jojo3,bean
jojo4,bean
jojo5,bean
jojo6,bean
jojo7,bean
jojo8,bean
jojo9,bean
{this is a blank row - just putting the text here for clarification)

My config for the step is here
image

And the result here shows thread 3 using jojo8 twice and never used jojo9.
image

If I left all other settings the same, but put 2 blank rows, then it worked correctly -> but 2 blank rows is really weird. Also to note, the behavior is same with 0 or 1 blank row at bottom of file.

Does not work in Distributed testing

Below is the error.

2024-03-27 16:21:20,181 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2024-03-27 16:21:20,182 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2024-03-27 16:21:20,332 INFO o.a.j.r.ClassFinder: Will scan jar C:\FTP_Jmter_LoadTest\apache-jmeter-5.6.3\apache-jmeter-5.6.3\lib\ext\di-extended-csv-2.2.jar with filter ExtendsClassFilter [parents=[interface org.apache.jmeter.functions.Function], inner=false, contains=null, notContains=null]. Consider exposing JMeter plugins via META-INF/services, and add JMeter-Skip-Class-Scanning=true manifest attribute so JMeter can skip classfile scanning
2024-03-27 16:21:20,340 INFO o.a.j.r.ClassFinder: Will scan jar C:\FTP_Jmter_LoadTest\apache-jmeter-5.6.3\apache-jmeter-5.6.3\lib\ext\jmeter-plugins-manager-1.10.jar with filter ExtendsClassFilter [parents=[interface org.apache.jmeter.functions.Function], inner=false, contains=null, notContains=null]. Consider exposing JMeter plugins via META-INF/services, and add JMeter-Skip-Class-Scanning=true manifest attribute so JMeter can skip classfile scanning
2024-03-27 16:21:20,769 INFO c.d.j.u.FileServerExtended: Default base='C:\FTP_Jmter_LoadTest\apache-jmeter-5.6.3\apache-jmeter-5.6.3\bin'
2024-03-27 16:21:20,770 ERROR o.a.j.e.StandardJMeterEngine: Unable to execute testStarted(FTDC6LRU002) for test element com.di.jmeter.config.ExtendedCsvDataSetConfig@f0cd55a5
java.lang.NullPointerException: Cannot invoke "org.apache.jmeter.gui.GuiPackage.getTestPlanFile()" because the return value of "org.apache.jmeter.gui.GuiPackage.getInstance()" is null

at com.di.jmeter.config.ExtendedCsvDataSetConfig.testStarted(ExtendedCsvDataSetConfig.java:210) ~[di-extended-csv-2.2.jar:?]
at com.di.jmeter.config.ExtendedCsvDataSetConfig.testStarted(ExtendedCsvDataSetConfig.java:227) ~[di-extended-csv-2.2.jar:?]
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:249) ~[ApacheJMeter_core.jar:5.6.3]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:432) ~[ApacheJMeter_core.jar:5.6.3]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

[bug] Plugin does not work in jmeter server/distributed mode

(Thanks for creating and supporting this plugin!)

How to replicate: run jmeter in distributed mode

  • command to run on the worker: bin/jmeter-server -Dserver.rmi.localport=50000 -Dserver_port=1099

The error message

  • this error message was only visible in 5.6.3 (5.6.2 did not properly display the error)
2024-03-05 22:48:01,419 INFO c.d.j.u.FileServerExtended: Default base='/jmeter/apache-jmeter-5.6.3/bin'
2024-03-05 22:48:01,433 ERROR o.a.j.e.StandardJMeterEngine: Unable to execute testStarted(10.240.0.158) for test element com.di.jmeter.config.ExtendedCsvDataSetConfig@b005ddcc
java.lang.NullPointerException: null
    at com.di.jmeter.config.ExtendedCsvDataSetConfig.testStarted(ExtendedCsvDataSetConfig.java:210) ~[di-extended-csv-2.1.jar:?]
    at com.di.jmeter.config.ExtendedCsvDataSetConfig.testStarted(ExtendedCsvDataSetConfig.java:227) ~[di-extended-csv-2.1.jar:?]
    at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:249) [ApacheJMeter_core.jar:5.6.3]
    at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:432) [ApacheJMeter_core.jar:5.6.3]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    at java.base/java.lang.Thread.run(Thread.java:829) [?:?]

source code

    public static boolean isNonGUI() {
      return "true".equals(System.getProperty("JMeter.NonGui"));
   }
  • doing a check on the property value with a JSR223 sampler we see that JMeter.NonGui: null
    • hence the NullPointerException error with the plug in
log.info("JMeter.NonGui: {}", System.getProperty("JMeter.NonGui"))

2024-03-05 23:23:16,510 INFO o.a.j.p.j.s.J.JSR223 Sampler: JMeter.NonGui: null

New GUI config element

New GUI element to disable subsequent options appropriately without referring the table

Unique dataset value not working

The other combinations are working fine except for this one, I am not sure if I am doing anything wrong.
When I was trying to select the unique row on each iteration/once the jmeter is throwing below error:

2023-03-13 16:17:55,943 ERROR o.a.j.t.JMeterThread: Test failed!
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:675) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:781) ~[?:?]
at com.di.jmeter.config.ExtendedCsvDataSetConfig.initBlockFeatures(ExtendedCsvDataSetConfig.java:164) ~[di-extended-csv-2.0.jar:?]
at com.di.jmeter.config.ExtendedCsvDataSetConfig.initVars(ExtendedCsvDataSetConfig.java:152) ~[di-extended-csv-2.0.jar:?]
at com.di.jmeter.config.ExtendedCsvDataSetConfig.iterationStart(ExtendedCsvDataSetConfig.java:53) ~[di-extended-csv-2.0.jar:?]
at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:391) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.control.GenericController.next(GenericController.java:160) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.control.TransactionController.next(TransactionController.java:135) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:222) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.control.GenericController.next(GenericController.java:175) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.control.LoopController.next(LoopController.java:134) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:99) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:266) ~[ApacheJMeter_core.jar:5.5]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.