I am using "Jmeter with CSV and SOAP/xml request". My tests are running within like 80 data sets and some fields in the CSV must be empty for testing issues.
My JMeter Build: -ThreadGroup -CSV Data -SOAP/XML -XPathExtractor -Outcome
CSV like a matrix table, multiple rows and columns.
SOAP/XML
...
<attribute xsi:type="ns2:stringType" name = "freeText2">
<value>${freeText2}</value>
</attribute>
<attribute xsi:type="ns2:longType" name = "amount">
<value>${amount}</value>
</attribute>
...
My Problem: When Jmeter has replaced the varibles:
<attribute xsi:type="ns2:stringType" name = "freeText2">
<value>This is my free Text</value>
</attribute>
<attribute xsi:type="ns2:longType" name = "amount">
<value>455667</value>
</attribute>
ALL IS FINE BUT when some are empty
<attribute xsi:type="ns2:stringType" name = "freeText2">
<value></value> ==>interpreted as STRING
</attribute>
<attribute xsi:type="ns2:longType" name = "amount">
<value></value> ==>interpreted as STRING
</attribute>
The System tells me that "Long Amount with "" is not possible" and also i dont want to have in my System a freeText2 with "" empty String.
Now my Question: Is there any way to wirte a adapter/handler/extractor...anything to get the Request empty String converted just to nothing (not Null because it will throw me a NullPointerException) like ==>
<attribute xsi:type="ns2:longType" name = "amount">
<value></value>
</attribute>
converted to
<attribute xsi:type="ns2:longType" name = "amount">
</attribute>
I hope you can help me with my issue, best regards, Daniel
No comments:
Post a Comment