Bug 61626 - __splitString behaviour is not intuitive and documentation is not explicit enough
Summary: __splitString behaviour is not intuitive and documentation is not explicit en...
Status: REOPENED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.3
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-17 18:02 UTC by Philippe Mouawad
Modified: 2017-10-23 19:50 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2017-10-17 18:02:06 UTC
__splitString has a counter intuitive behaviour when separator is "," (default one).

Problem 1:
Indeed, the String to split would need to be escaped which is in fact rarely the case when you need this function ?

Will String really contain:
"a\,b\,c"

Or :
"a,b,c"


Problem 2:
Also, when you by error input this:
${__split(a\,b\,c,varSplit,)}

It doesn't work because function uses empty separator which is wrong, as documentation says this parameter defaults to ",". So function should just ignore this empty .

Problem 2 can be fixed.
How to fix problem 1 ?
Comment 1 Philippe Mouawad 2017-10-17 19:32:22 UTC
Author: pmouawad
Date: Tue Oct 17 19:31:46 2017
New Revision: 1812445

URL: http://svn.apache.org/viewvc?rev=1812445&view=rev
Log:
Bug 61628 - If split string has empty separator default separator is not used
Bugzilla Id: 61628

Modified:
    jmeter/trunk/src/functions/org/apache/jmeter/functions/SplitFunction.java
    jmeter/trunk/test/src/org/apache/jmeter/functions/SplitFunctionTest.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Philippe Mouawad 2017-10-17 19:32:44 UTC
Oups wrong commit
Comment 3 Philippe Mouawad 2017-10-17 19:33:06 UTC
Problem 2 fixed in Bug 61628