0

I have to pom file as below to set a 4 JMeter system properties

<plugin>
    <groupId>com.lazerycode.jmeter</groupId>
    <artifactId>jmeter-maven-plugin</artifactId>
    <version>${jmeter-maven-plugin.version}</version>
    <configuration>
        <skipTests>${skipNFTs}</skipTests>
        <generateReports>true</generateReports>
        <reportDirectory>${basedir}/target/reports/${performanceTest}</reportDirectory>
        <logsDirectory>${basedir}/target/reports/${performanceTest}</logsDirectory>
        <jmeterExtensions>
            <artifact>org.apache.activemq:activemq-all:jar:5.16.0</artifact>
        </jmeterExtensions>
        <junitLibraries/>
        <propertiesSystem>
            <javax.net.ssl.trustStore>${project.build.directory}/target/jmeter/keystore/eskort_keystore.keystore</javax.net.ssl.trustStore>
            <javax.net.ssl.trustStorePassword>P@ssw0rd</javax.net.ssl.trustStorePassword>
            <javax.net.ssl.keyStore>${basedir}/target/jmeter/keystore/eskort_keystore.keystore</javax.net.ssl.keyStore>
            <javax.net.ssl.keyStorePassword>P@ssw0rd</javax.net.ssl.keyStorePassword>
        </propertiesSystem>
</plugin>

the output that i take is :

 #Thu Jun 08 17:42:06 EEST 2023 javax.net.ssl.keyStore=C\:\\MyTools\\GitRepo\\Compliance\\performance/target/jmeter/keystore/eskort_keystore.keystore
 javax.net.ssl.keyStorePassword=P@ssw0rd
 avax.net.ssl.trustStore=C\:\\MyTools\\GitRepo\\Compliance\\performance\\targt/target/jmeter/keystore/eskort_keystore.keystore
 javax.net.ssl.trustStorePassword=P@ssw0rd
 sun.net.http.allowRestrictedHeaders=true

the problem is is not usable due to the C\ : at the beginning of the path .

how i can fix it ?

Luca Ruggeri
  • 121
  • 1
  • 7

2 Answers2

0

I see that you are mixing variables:

${project.build.directory} is results in the path to your "target" directory.

${basedir} represents the directory containing pom.xml

so in the system property <javax.net.ssl.trustStore> you are adding an extra "target" that is not needed. you should check/review what do you have in your target folder and after set the properties accordingly.

Note: normally a the keystore file usually has a .jks extension.

NTam
  • 26
  • 3
0

If your eskort_keystore.keystore lives at the same folder where pom.xml - you should use ${project.basedir}/eskort_keystore.keystore instead.

I don't know where did you get this "output" but Maven and Java should handle Windows file paths without any issues.

enter image description here

As you can see the Groovy script in the JSR223 Sampler checks the path and the presence of the keystore file under the given path and succeeds.

More information: Maven Properties Guide

Dmitri T
  • 159,985
  • 5
  • 83
  • 133