Search code examples
mavenssljmeterkeystorejmeter-maven-plugin

Jmeter plugin , does not take the keystore provided in properties


Jmeter plugin does not seem to load the system variables provided in the configuration tab.

<plugin>
            <groupId>com.lazerycode.jmeter</groupId>
            <artifactId>jmeter-maven-plugin</artifactId>
            <version>1.4.1</version>
            <executions>
                <execution>
                    <id>jmeter-tests</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>jmeter</goal>
                    </goals>
                    <configuration>
                        <propertiesSystem>
                            <javax.net.debug>all</javax.net.debug>
                            <javax.net.ssl.keyStore>${basedir}/src/test/resources/clientKeystoreFin.jks</javax.net.ssl.keyStore>
                            <javax.net.ssl.keyStorePassword>changeit</javax.net.ssl.keyStorePassword>
                            <https.socket.protocols>TLSv1</https.socket.protocols>
                            <sun.security.ssl.allowUnsafeRenegotiation>true</sun.security.ssl.allowUnsafeRenegotiation>
                        </propertiesSystem>
                        <ignoreResultFailures>true</ignoreResultFailures>
                    </configuration>
                </execution>
            </executions>
        </plugin>

After providing this and executing the plugin does not really seem to validate the keystore, I don't find any realted logs in the jmeter log, I even tried providing the system.properties file in the ${basedir}/src/test/jmeter, as stated here https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Modifying-Properties Even that doesn't works. With the same system.properties file changes i was able to run from the jmeter GUI.

Can somebody help me in pointing out the problem here.


Solution

  • The reason was just the older version of the plugin i used. Updated to latest 1.10.1, and enabled some of the logs adding the following in the configuration *

    <overrideRootLogLevel>DEBUG</overrideRootLogLevel>
    <suppressJMeterOutput>false</suppressJMeterOutput>
    <jmeterLogLevel>DEBUG</jmeterLogLevel>
    
    • Now i could clearly see the ssl logs in the command prompt where i run the maven verify and the keystore file is added.Hope this would help somebody who are struck up with the same issue.