nolleh
nolleh

Reputation: 107

jmeter add directory or jar to class path from relative path

I want to use relative path for TestPlan's 'Add directory or jar to classpath' item.

because the library what I want to use is different from plan( by plan,
so I want to couppling the library to plan, and 'set the directory for jar file' as relative path from plan file.

for example.

my/A/plan/A.plan
my/A/libs/some_jar_for_A_plan.jar

and set 'Add directory or jar to classpath' as

../libs # not works

but it looks like it cannot find the jar file. of course, when I use is as canonical path, it works.

my/A/libs/ # works

isn't there any method for set library path as relative for plan? (like csv data set config file path!)

<code>enter image description here</code>

Upvotes: 0

Views: 2063

Answers (1)

Dmitri T
Dmitri T

Reputation: 168237

I cannot reproduce your issue using latest JMeter 5.2.1

Just in case, you also can add your libs folder to JMeter Classpath by setting user.classpath JMeter Property, it can be done:

  1. Via -J command-line argument:

    jmeter -Juser.classpath=../libs 
    
  2. By adding the next line to user.properties file:

    user.classpath=../libs
    

More information: Apache JMeter Properties Customization Guide

Upvotes: 2

Related Questions