You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Tong P." <to...@yahoo.com> on 2004/12/13 05:07:37 UTC

StringFromFile and Split

I am new for Jmeter. I have assigned to develop test
case for Informix Database. I want to read data from
file and split it for dynamic parameters query.

I try to put them on User Parameters Preprocessor. The
StringFromFile work well but the Split function
dosen't work. The following is code
Name: ACCOUNTID
User_1: ${_StringFromFile(accounds.dat)}
Name: TEMPVAL
User_1: ${__Split(${ACCOUNTID}, RETVAL)}

For the StringFromFile, It's work. I see the result on
log file. But for the split, It shows ( in log)
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: About to replace in
property of tipe: class
org.apache.jmeter.testelement.property.StringProperty:
${__Split(${ACCOUNTID}, RETVAL)} 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: Replacement result:
${__Split(${ACCOUNTID}, RETVAL)} 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: Replacement result:
[${_StringFromFile(accounts.dat)},
${__Split(${ACCOUNTID}, RETVAL)}] 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: Replacement result:
[[${_StringFromFile(accounts.dat)},
${__Split(${ACCOUNTID}, RETVAL)}]] 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: About to replace in
property of tipe: class
org.apache.jmeter.testelement.property.BooleanProperty:
true 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: Won't replace. 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: About to replace in
property of tipe: class
org.apache.jmeter.testelement.property.BooleanProperty:
true 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: Won't replace. 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: About to replace in
property of tipe: class
org.apache.jmeter.testelement.property.StringProperty:
/ 
2547/12/13 11:01:57 DEBUG -
jmeter.engine.util.ValueReplacer: Replacement result:
/ 

Where should i put the __Split function on for let it work?


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: StringFromFile and Split

Posted by sebb <se...@gmail.com>.
The function is __split(), not __Split() - see the Function Helper and
Help itself.

Unrecognised functions are not replaced, which is why the original
text is still in the output.

S.

On Sun, 12 Dec 2004 20:07:37 -0800 (PST), Tong P. <to...@yahoo.com> wrote:
> I am new for Jmeter. I have assigned to develop test
> case for Informix Database. I want to read data from
> file and split it for dynamic parameters query.
> 
> I try to put them on User Parameters Preprocessor. The
> StringFromFile work well but the Split function
> dosen't work. The following is code
> Name: ACCOUNTID
> User_1: ${_StringFromFile(accounds.dat)}
> Name: TEMPVAL
> User_1: ${__Split(${ACCOUNTID}, RETVAL)}
> 
> For the StringFromFile, It's work. I see the result on
> log file. But for the split, It shows ( in log)
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: About to replace in
> property of tipe: class
> org.apache.jmeter.testelement.property.StringProperty:
> ${__Split(${ACCOUNTID}, RETVAL)}
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: Replacement result:
> ${__Split(${ACCOUNTID}, RETVAL)}
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: Replacement result:
> [${_StringFromFile(accounts.dat)},
> ${__Split(${ACCOUNTID}, RETVAL)}]
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: Replacement result:
> [[${_StringFromFile(accounts.dat)},
> ${__Split(${ACCOUNTID}, RETVAL)}]]
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: About to replace in
> property of tipe: class
> org.apache.jmeter.testelement.property.BooleanProperty:
> true
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: Won't replace.
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: About to replace in
> property of tipe: class
> org.apache.jmeter.testelement.property.BooleanProperty:
> true
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: Won't replace.
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: About to replace in
> property of tipe: class
> org.apache.jmeter.testelement.property.StringProperty:
> /
> 2547/12/13 11:01:57 DEBUG -
> jmeter.engine.util.ValueReplacer: Replacement result:
> /
> 
> Where should i put the __Split function on for let it work?
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org