You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ra...@alcatel.fr on 2005/09/06 15:22:53 UTC
Bug with _StringFromFile ??
Hi all,
i'm using the version 2.1 of jmeter.
i'm string to use the _StringFromFile function in a parameter value of
my http request like this :
${_StringFromFile(D:\data_file#.txt,,1,2)}
it doesn't seem to work. i've check the log and indeed, i notice
something wrong.
the files that i expect to be read (they exist on the disk) are
data_file1.txt and data_file2.txt. but jmeter seems to try reading a
file named "data_file1,txt". the comma makes obviously the file name
incorrect.
is this a bug or i am mistaking somewhere
2005/09/06 15:15:48 INFO - jmeter.engine.StandardJMeterEngine: Running
the test!
2005/09/06 15:15:48 INFO - jmeter.functions.StringFromFile:
setParameters(D:\data_file#.txt,,1,2)
2005/09/06 15:15:48 INFO - jmeter.gui.util.JMeterMenuBar:
setRunning(true,local)
2005/09/06 15:15:49 INFO - jmeter.engine.StandardJMeterEngine: Starting
10 threads for group Test Thread. Ramp up = 0.
2005/09/06 15:15:49 INFO - jmeter.engine.StandardJMeterEngine: Continue
on error
2005/09/06 15:15:49 INFO - jmeter.threads.JMeterThread: Thread Test
Thread 1-1 started
2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
1-1 Start = 1 Current = 1 End = 2
2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
1-1 using format D:\data_file#.txt
2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
1-1 *opening file D:\data_file1,txt*
2005/09/06 15:15:49 ERROR - jmeter.functions.StringFromFile: openFile()
error: java.io.*FileNotFoundException: D:\data_file1,txt* (Le fichier
spécifié est introuvable)
Thanks in advance
Raj
Re: Bug with _StringFromFile ??
Posted by sebb <se...@gmail.com>.
On further investigation, I think the work-round is actually the way
to solve this problem.
The "." character is a format character, so "#." applied to 1 becomes
"1~" - where ~ is the decimal point for the locale.
In the "en" locale, this is ".", so it can look as if the "." is just
copied to the output.
However, this is not the case, as the "fr" locale shows.
I'll update the documentation to make this clear.
On 06/09/05, Raj.Mulji_Solanski@alcatel.fr
<Ra...@alcatel.fr> wrote:
> Hi Sebb,
>
> thanks for the quick answer. indeed, my locale is fr.
> your work-round solves my problem.
>
> Thank you very much
> Raj
>
>
> sebb a écrit :
>
> >This looks like a localisation problem.
> >
> >As a work-round, please try the following:
> >
> >${_StringFromFile(D:\data_file#'.'txt,,1,2)}
> >
> >i.e. single-quote the .
> >
> >Presumably your Locale is "fr" ?
> >
> >I'll look at fixing this properly later, but hopefully the work-round
> >will work ...
> >
> >S.
> >On 06/09/05, Raj.Mulji_Solanski@alcatel.fr
> ><Ra...@alcatel.fr> wrote:
> >
> >
> >>Hi all,
> >>
> >>i'm using the version 2.1 of jmeter.
> >>i'm string to use the _StringFromFile function in a parameter value of
> >>my http request like this :
> >>${_StringFromFile(D:\data_file#.txt,,1,2)}
> >>
> >>it doesn't seem to work. i've check the log and indeed, i notice
> >>something wrong.
> >>the files that i expect to be read (they exist on the disk) are
> >>data_file1.txt and data_file2.txt. but jmeter seems to try reading a
> >>file named "data_file1,txt". the comma makes obviously the file name
> >>incorrect.
> >>
> >>is this a bug or i am mistaking somewhere
> >>
> >>2005/09/06 15:15:48 INFO - jmeter.engine.StandardJMeterEngine: Running
> >>the test!
> >>2005/09/06 15:15:48 INFO - jmeter.functions.StringFromFile:
> >>setParameters(D:\data_file#.txt,,1,2)
> >>2005/09/06 15:15:48 INFO - jmeter.gui.util.JMeterMenuBar:
> >>setRunning(true,local)
> >>2005/09/06 15:15:49 INFO - jmeter.engine.StandardJMeterEngine: Starting
> >>10 threads for group Test Thread. Ramp up = 0.
> >>2005/09/06 15:15:49 INFO - jmeter.engine.StandardJMeterEngine: Continue
> >>on error
> >>2005/09/06 15:15:49 INFO - jmeter.threads.JMeterThread: Thread Test
> >>Thread 1-1 started
> >>2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
> >>1-1 Start = 1 Current = 1 End = 2
> >>2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
> >>1-1 using format D:\data_file#.txt
> >>2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
> >>1-1 *opening file D:\data_file1,txt*
> >>2005/09/06 15:15:49 ERROR - jmeter.functions.StringFromFile: openFile()
> >>error: java.io.*FileNotFoundException: D:\data_file1,txt* (Le fichier
> >>spécifié est introuvable)
> >>
> >>
> >>Thanks in advance
> >>Raj
> >>
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Bug with _StringFromFile ??
Posted by Ra...@alcatel.fr.
Hi Sebb,
thanks for the quick answer. indeed, my locale is fr.
your work-round solves my problem.
Thank you very much
Raj
sebb a écrit :
>This looks like a localisation problem.
>
>As a work-round, please try the following:
>
>${_StringFromFile(D:\data_file#'.'txt,,1,2)}
>
>i.e. single-quote the .
>
>Presumably your Locale is "fr" ?
>
>I'll look at fixing this properly later, but hopefully the work-round
>will work ...
>
>S.
>On 06/09/05, Raj.Mulji_Solanski@alcatel.fr
><Ra...@alcatel.fr> wrote:
>
>
>>Hi all,
>>
>>i'm using the version 2.1 of jmeter.
>>i'm string to use the _StringFromFile function in a parameter value of
>>my http request like this :
>>${_StringFromFile(D:\data_file#.txt,,1,2)}
>>
>>it doesn't seem to work. i've check the log and indeed, i notice
>>something wrong.
>>the files that i expect to be read (they exist on the disk) are
>>data_file1.txt and data_file2.txt. but jmeter seems to try reading a
>>file named "data_file1,txt". the comma makes obviously the file name
>>incorrect.
>>
>>is this a bug or i am mistaking somewhere
>>
>>2005/09/06 15:15:48 INFO - jmeter.engine.StandardJMeterEngine: Running
>>the test!
>>2005/09/06 15:15:48 INFO - jmeter.functions.StringFromFile:
>>setParameters(D:\data_file#.txt,,1,2)
>>2005/09/06 15:15:48 INFO - jmeter.gui.util.JMeterMenuBar:
>>setRunning(true,local)
>>2005/09/06 15:15:49 INFO - jmeter.engine.StandardJMeterEngine: Starting
>>10 threads for group Test Thread. Ramp up = 0.
>>2005/09/06 15:15:49 INFO - jmeter.engine.StandardJMeterEngine: Continue
>>on error
>>2005/09/06 15:15:49 INFO - jmeter.threads.JMeterThread: Thread Test
>>Thread 1-1 started
>>2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
>>1-1 Start = 1 Current = 1 End = 2
>>2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
>>1-1 using format D:\data_file#.txt
>>2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
>>1-1 *opening file D:\data_file1,txt*
>>2005/09/06 15:15:49 ERROR - jmeter.functions.StringFromFile: openFile()
>>error: java.io.*FileNotFoundException: D:\data_file1,txt* (Le fichier
>>spécifié est introuvable)
>>
>>
>>Thanks in advance
>>Raj
>>
>>
>>
>>
>>
>
>---------------------------------------------------------------------
>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
Re: Bug with _StringFromFile ??
Posted by sebb <se...@gmail.com>.
This looks like a localisation problem.
As a work-round, please try the following:
${_StringFromFile(D:\data_file#'.'txt,,1,2)}
i.e. single-quote the .
Presumably your Locale is "fr" ?
I'll look at fixing this properly later, but hopefully the work-round
will work ...
S.
On 06/09/05, Raj.Mulji_Solanski@alcatel.fr
<Ra...@alcatel.fr> wrote:
> Hi all,
>
> i'm using the version 2.1 of jmeter.
> i'm string to use the _StringFromFile function in a parameter value of
> my http request like this :
> ${_StringFromFile(D:\data_file#.txt,,1,2)}
>
> it doesn't seem to work. i've check the log and indeed, i notice
> something wrong.
> the files that i expect to be read (they exist on the disk) are
> data_file1.txt and data_file2.txt. but jmeter seems to try reading a
> file named "data_file1,txt". the comma makes obviously the file name
> incorrect.
>
> is this a bug or i am mistaking somewhere
>
> 2005/09/06 15:15:48 INFO - jmeter.engine.StandardJMeterEngine: Running
> the test!
> 2005/09/06 15:15:48 INFO - jmeter.functions.StringFromFile:
> setParameters(D:\data_file#.txt,,1,2)
> 2005/09/06 15:15:48 INFO - jmeter.gui.util.JMeterMenuBar:
> setRunning(true,local)
> 2005/09/06 15:15:49 INFO - jmeter.engine.StandardJMeterEngine: Starting
> 10 threads for group Test Thread. Ramp up = 0.
> 2005/09/06 15:15:49 INFO - jmeter.engine.StandardJMeterEngine: Continue
> on error
> 2005/09/06 15:15:49 INFO - jmeter.threads.JMeterThread: Thread Test
> Thread 1-1 started
> 2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
> 1-1 Start = 1 Current = 1 End = 2
> 2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
> 1-1 using format D:\data_file#.txt
> 2005/09/06 15:15:49 INFO - jmeter.functions.StringFromFile: Test Thread
> 1-1 *opening file D:\data_file1,txt*
> 2005/09/06 15:15:49 ERROR - jmeter.functions.StringFromFile: openFile()
> error: java.io.*FileNotFoundException: D:\data_file1,txt* (Le fichier
> spécifié est introuvable)
>
>
> Thanks in advance
> Raj
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org