Well, it didn't do what I wanted it to. If I comment out user.dir in
properties file, then user.dir is "C:\Program Files\jakarta-jmeter-2.1.1\bin".
It worked for me before because user.,dir was set to the directory where my
test scripts are, but in production we are not going to have this property
set on our servers, because we are going to have many directories
with different scripts. These scripts are executed from Ant, but also
manually on tester's local machines. If it was run only from Ant I could
have this easily taken care of, but since the same script testers will
download and execute on their machines I have to figure out different way of
solving this. I probably need to rephrase the question - I need the
directory of the current test script that is being run.

Amela


On 4/28/06, sebb <[EMAIL PROTECTED]> wrote:

user.dir is set during startup on each host

Try it and see.

On 28/04/06, amelaao <[EMAIL PROTECTED]> wrote:
> I realized property user.dir is a solution for my local machine. However
I
> can't have this dependency since our scripts are deployed on different
> machines and used for different releases, plus I don't have the control
of
> jmeter.properties file.So my solution needs to read the current
directory
> and then use it to calculate the path to some other file. It may be a
bit
> confusing, but the bottom line is that I have to use a different way of
> finding current directory.
>
> Thanks,
> Amela
>
>
> On 4/27/06, sebb <[EMAIL PROTECTED]> wrote:
> >
> > On 28/04/06, amelaao <[EMAIL PROTECTED]> wrote:
> > > Sebb,
> > > Thanks. ${__P(user.dir)} did do the trick without changing anything
> > else.
> > > Why do you think _BeanShell didn't work. There were no errors in the
log
> > > file, amd at the same place in the Listener after JaveRequest
Sampler,
> > where
> > > it now prints the current dir, there was "JavaRequest".
> >
> > Because pwd() _prints_ the current directory - it returns nothing -
> > output goes to standard output, i.e. the console window.
> >
> >
> > > Amela
> > >
> > >
> > > On 4/27/06, sebb <[EMAIL PROTECTED]> wrote:
> > > >
> > > > On 27/04/06, amelaao <[EMAIL PROTECTED]> wrote:
> > > > > I want to get the value of current directory into a variable and
use
> > it
> > > > to
> > > >
> > > > ${__P(user.dir)}
> > > >
> > > > might work for you.
> > > >
> > > > > create a new path. I'm using BeanShell for this, having my user
> > > > parameter
> > > > > workingDir defined as ${__BeanShell(pwd(),)}, thinking that I
can
> > use it
> > > > > later as ${workingDir}. My first test was just to display
> > ${workingDir}
> > > > > using JavaRequest Sampler before even going further. I
downloaded
> > > > > bshXX.jarin jmeter/lib. However my JavaRequest doesn't print
> > anything
> > > > > in its
> > > > > Listener, except for  text "JavaRequest" which is usually not a
good
> > > > sign.
> > > >
> > > > Which Listener?
> > > > Where did you put ${workingDir} in the JavaRequest Sampler?
> > > >
> > > > > Any ideas?
> > > >
> > > > Have you checked in jmeter.log for any error messages?
> > > >
> > > > > Thanks,
> > > > > Amela
> > > > >
> > > > >
> > > >
> > > >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > Regards,
> > > Amela
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Regards,
> Amela
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Regards,
Amela

Reply via email to