How to save the log file in the same folder as jmx file

Hi All,

I’ve been struggling today to save Aggregate Graph’s log file in the same directory as the project file.
Finally after 2h of crawling thru google I’ve sorted that out by myself.

All you need to do is to use such a simple and obvious thing like tilde “~” and put it before your desired log file name 🙂

~/jmeter-results-${__time(YMDHMS)}.csv

this is how you can save your log file in jmx's home directory

this is how you can save your log file in jmx’s home directory

Hope you’ll find it helpful.

J

One thought on “How to save the log file in the same folder as jmx file

  1. arggghhh,…..
    in case you’d like to get the current project location using BeanShell PreProcessor

    try this code:

    import org.apache.jmeter.services.FileServer;

    // get current FileServer
    FileServer f = FileServer.getFileServer();

    // this line will add new variable
    // that can be accessed just like any other variable: ${currentDir}
    vars.putObject(“currentDir”, f.getBaseDir() );

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s