Comments (4)
I will try your suggestion tomorrow and feedback to you. Adding this in the CSV docs section may help others as well should it work.
from jmeter-dotnet-dsl.
Hello, thank you for trying and asking about this and providing so well formatted report.
Currently the CsvDataSet
element already sets allow quoted data to true. This was done to standarize the formatting of CSV files regardless if random order is required or not (random order uses Blazemeter plugin which contains Random CSV Data Set Config element, and such element does not provide a setting to disable such behavior).
In your case you can adapt the csv by enclosing with quotes and replacing each quote with double quotes (a standard CSV format for quoted values). Eg:
HeaderValue
"[{ ""keyValue1"" : ""dataValue1""}]
"[{ ""keyValue2"" : ""dataValue2""}]
"[{ ""keyValue3"" : ""dataValue3""}]
Do you think that with such workaround is still required to add support for the "unquoted" option? That would require extending the BM plugin to support the unquoted case)?
from jmeter-dotnet-dsl.
@rabelenda - While thinking about your suggestion, I think the Allow Quoted data should be configurable as your suggestion means that the payload is not conforming to the JSON standard. This requires re-working of any JSON data to have an invalid JSON payload which is means you are diverging from standards.
While I appreciate that you are trying to standardise things, sticking to the standards for a given language should be a priority.
Additional examples.... If you are posting XML, HTML, JS, etc directly you should have the ability to send the data verbatim for that given row in a CSV. Exactly like producer and consumer would act and form/produce/send the markup for each request.
(Extra info: Allow quoted data would be set to False in order to allow this to be processed and not the default of true as it is currently set to.)
from jmeter-dotnet-dsl.
Hello, thank you for your feedback.
Regarding the content not conforming with JSON standard, keep in mind that we are talking about a CSV file, and not a JSON file, so you should expect to do some transformations on your contents when copying one format inside another.
For instance, this JSON will not be parsed correctly regardless the allow quoted flag, and it will even not be parsed as you would expect for most of CSV parsers:
VAL
["val","test"]
Unless you escape it properly to be a CSV file you will get VAL=["val"
Same happens with other formats you describe as XML, HTML, JS, etc. CSV parsers usually split by the comma, unless the field starts with double quotes.
Other examples that will fail parsing:
{"field": "val, ue"}
<field tags="t1,t2">val</field>
<field>my, val</field>
You will always need to make sure that your "inner" format complies with CSV.
The easiest rule to make your format comply with CSV, is replacing each double quotes with two double quotes and add double quotes at the beginning and end of each value. This is the rule I applied to your example.
from jmeter-dotnet-dsl.
Related Issues (16)
- Setting name for HttpSampler is not working HOT 2
- I need to create POST requests with different body each one HOT 5
- `Perc99` lower than `Perc95` and `Perc90` HOT 2
- Connect to WebSocket/SignalR HOT 2
- Add possibility to run HttpSampler to execute a fixed number of times. HOT 2
- Getting System.InvalidOperationException when running test plan - .Net Framework Library HOT 4
- Add A Support for Post Request with FormParams JMeter DSL Dotnet HOT 1
- Incorporate functionality to verify the expected response. HOT 2
- threadPause support? HOT 2
- Error when trying to execute a simple test using a CSV file and Azure Load Testing HOT 2
- Backend Listener HOT 1
- How to detect Java_Home is correct set? HOT 4
- Threadgroup missing Loopcount in configuration HOT 1
- Assertion missing Average option HOT 8
- Perfmon Plugin & Updation of JMeter Properties in jmeter dsl dotnet HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmeter-dotnet-dsl.