Hi,

Scenario is i'm creating a file(database_response.txt) using BeanShell
Listener where the same place JMX file exists and acessing it with
CSVDataSet Config. This is working fine with GUI mode (i have noticed
jmeter.log is create in the same place where JMX file exists). But with
NON-GUI mode both jmeter.log and database_response.txt created in the
$JMETER_HOME/bin directory. My observation is CSVDataSet is looking for the
correct path but file is creating in the wrong place.

#### Code #####
.
.
try {
      FileWriter responseFile = new FileWriter( "database_response.txt");
      
      String response = sampleResult.getResponseDataAsString();
      String act_response="";
.
.

#### Log #####
.
.
.
2007/10/02 18:02:49 INFO  - jmeter.JMeter: os.name=Windows 2000 
2007/10/02 18:02:49 INFO  - jmeter.JMeter: os.arch=x86 
2007/10/02 18:02:49 INFO  - jmeter.JMeter: os.version=5.0 
2007/10/02 18:02:49 INFO  - jmeter.JMeter: Default Locale=English (United
States) 
2007/10/02 18:02:49 INFO  - jmeter.JMeter: JMeter  Locale=English (United
States) 
2007/10/02 18:02:49 INFO  - jmeter.JMeter: JMeterHome=C:\Documents and
Settings\manjulap\.maven\cache\maven-mecp-test-plugin-2.0.5\jakarta-jmeter-2
.2 
2007/10/02 18:02:49 INFO  - jmeter.JMeter:
user.dir=D:/projects/mecp-test/target/tmp/testcases 
2007/10/02 18:02:49 INFO  - jmeter.JMeter: PWD
=D:\projects\mecp-test\target\tmp\testcases 
2007/10/02 18:02:49 INFO  - jmeter.JMeter: Loading file:
D:\projects\mecp-test\target\tmp\testcases\invoice_tc044.jmx 
.
.
.
2007/10/02 18:02:54 ERROR - jmeter.config.CSVDataSet:
java.io.FileNotFoundException:
D:\projects\mecp-test\target\tmp\testcases\database_response.txt (The system
cannot find the file specified) 
2007/10/02 18:02:54 ERROR - jmeter.threads.JMeterThread:
java.lang.IllegalArgumentException: protocol = http host = null
.
.
.


Thx & BR,
Manjula



> -----Original Message-----
> From: sebb [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 02, 2007 4:30 PM
> To: JMeter Users List
> Subject: Re: Relative Path Issue
> 
> What file reference is failing?
> Is it a CSV data set?
> Or some other reference e.g. CSVRead or StringFromFile?
> Or your own code?
> 
> What error do you get in the log file?
> 
> CSV Dataset uses the path of the running JMX file as the base for any
> relative file references; other test elements may use a different
> base.
> 
> On 02/10/2007, Manjula Priyantha <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > After doing few tests I realized that changing "user.dir" is worked fine
> > with GUI mode and not working with NON-GUI mode.
> >
> > Since I'm working with NON-GUI mode, can anyone help me to solve this
> > problem?
> >
> > Thx & BR,
> > Manjula
> >
> > -----Original Message-----
> > From: Manjula Priyantha [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 01, 2007 6:52 PM
> > To: 'JMeter Users List'
> > Subject: RE: Relative Path Issue
> >
> > Hi Sebb,
> >
> > Thx for the reply. I was successful with your instructions. But I need
> > further help.
> >
> > Log (The way I have used earlier)
> >
> > 2007/10/01 16:08:07 INFO  - jmeter.JMeter:
> > JMeterHome=D:\INSTALLATIONS\jakarta-jmeter-2.2
> > 2007/10/01 16:08:07 INFO  - jmeter.JMeter:
> > user.dir=D:\INSTALLATIONS\jakarta-jmeter-2.2\bin
> > 2007/10/01 16:08:07 INFO  - jmeter.JMeter: PWD
> > =D:\INSTALLATIONS\jakarta-jmeter-2.2\bin
> >
> > Log (The way you have instructed)
> >
> > 2007/10/01 16:01:46 INFO  - jmeter.JMeter:
> > JMeterHome=D:\INSTALLATIONS\jakarta-jmeter-2.2
> > 2007/10/01 16:01:46 INFO  - jmeter.JMeter:
> > user.dir=D:\projects\mecp-test\target\tmp\testcases
> > 2007/10/01 16:01:46 INFO  - jmeter.JMeter: PWD
> > =D:\projects\mecp-test\target\tmp\testcases
> >
> > I feel "user.dir" done the trick here(pls correct if I'm wrong), since i
> am
> > trying to integrate maven & jmeter pls help me to sort this out.
> >
> > I have used <jvmarg value="-Duser.dir=${jmeter.tempdir}/testcases"/> to
> send
> > parameter. Now log shows everything like the way u instructed, but the
> > result is same as previous. I'm using WIN2K machine.
> >
> > Your help is greatly appreciated.
> >
> > BR,
> > Manjula
> >
> >
> >
> > -----Original Message-----
> > From: sebb [mailto:[EMAIL PROTECTED]
> > Sent: Friday, September 28, 2007 5:51 PM
> > To: JMeter Users List
> > Subject: Re: Relative Path Issue
> >
> > JMeter looks up relative files based on the current working directory.
> >
> > So just start JMeter in the appropriate directory.
> >
> > Also, it's best to use / rather than \ in path names.
> >
> > On 28/09/2007, Manjula Priyantha <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > >
> > >
> > > I have a requirement of referring files relative to the JMX file.
> > >
> > >
> > >
> > > Example:
> > >
> > >
> > >
> > > "D:\projects\mecp-test\testcases\invoice_tc044.jmx"  file is referring
> to
> > > "D:\projects\mecp-test\inputs\invoice_tc044.xml" file.
> > >
> > > Need is to use "..\inputs\ invoice_tc044.xml" in the JMX file.
> > >
> > >
> > >
> > > The solution should be regardless of $JMETER_HOME/bin directory.
> > >
> > > Pls. help me to find a solution.
> > >
> > >
> > >
> > > Thx & BR,
> > >
> > > Manjula
> > >
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to