0

I am average user of jmeter. I did lot of searching for my error before finally decided to post here. I did check github site for the jmeter-mvn-plugin I could not relate my issue with open issues or fixed ones (it could be due to lack of my knowledge about jmeter or maven :))

I am using jmeter 3.3 and latest jmeter-maven-plugin 2.6.0. I have one https request that I want to do performance testing with. I had testplan on jmeter 2.3 and worked fine with older 1.x version jmeter-maven-plugin. Same test plan does not work after the upgrade of jmeter and jmeter maven plugin when I run on commandline. I created same plan again on jmeter3.3 since somewhere it was suggested 'I can't run testplan created on jmeter2.3 using jmeter3.3 (jenkins has 3.3 now) but No success. It works on gui mode just fine.

my setup is to run jmeter test plan via jenkins using maven. Currently I can't even make it work locally via commandline.

I did try downgrading even though jmeter-maven-plugin does not really support anything else but latest version. downgraded to 2.0.3 plugin and jmeter 3.0 but still no luck.

I am seeing two issues that I need help with:

1) I get connection refused, I have narrowed it down to request being https vs http. Regular http request works fine

<httpSample t="295" it="0" lt="0" ts="1516377023875" s="false" lb="HTTP Request" rc="**Non HTTP response code: java.net.ConnectException" rm="Non HTTP response message: Connection refused**" tn="Thread Group 1-1" dt="text" by="2371" ng="1" na="1">

2) I pass values for users, duration, rampup, datafile etc via maven properties that eventually get set in jmeter paramerters for example -DUsers=50 passed in maven command on jenkins will set for {__P(users)} inside jmeter. This does not work, I can tell from logs, it does not put the values for Jmeter Parameters that were passed. hostname, port, users, duration everything goes null or default. I tried using udv's as well but same problem, values dont get passed. It worked fine before upgrade.

below is my pom file.

<modelVersion>4.0.0</modelVersion>
<groupId>com.abcd.efg</groupId>
<artifactId>app-Performance-Test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<build>
    <plugins>
        <plugin>
            <groupId>com.lazerycode.jmeter</groupId>
            <artifactId>jmeter-maven-plugin</artifactId>
            <version>2.6.0</version>
                <executions>
                    <execution>
                        <id>jmeter-tests</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                </executions>
                        <configuration>
                            <generateReports>true</generateReports>
                            <scanResultsForSuccessfulRequests>true</scanResultsForSuccessfulRequests>
                            <scanResultsForFailedRequests>true</scanResultsForFailedRequests>
                            <downloadOptionalDependencies>false</downloadOptionalDependencies>
                            <resultsDirectory>/path/report</resultsDirectory>
                            <propertiesUser>
                                <host>${hostName}</host>
                                <port>${portNumber}</port>
                                <users>${Users}</users>
                                <duration>${duration}</duration>
                                <rampup>${rampUp}</rampup>
                                <datafile>${test.data}</datafile>
                            </propertiesUser>
                            <jmeterExtensions>
                                <artifact>kg.apc:jmeter-plugins-casutg:2.4</artifact>
                            </jmeterExtensions>
                            <testResultsTimestamp>false</testResultsTimestamp>
                            <excludedArtifacts>
                                <exclusion>commons-pool2:commons-pool2</exclusion>
                                <exclusion>commons-math3:commons-math3</exclusion>
                                <exclusion>org.slf4j:slf4j-nop</exclusion>
                                <exclusion>logkit:logkit</exclusion>
                                <exclusion>avalon-logkit:avalon-logkit</exclusion>
                                <exclusion>jdom:jdom</exclusion>
                                <exclusion>log4j:log4j</exclusion>
                                <exclusion>commons-logging:commons-logging</exclusion>
                                <exclusion>excalibur-logger:excalibur-logger</exclusion>
                            </excludedArtifacts>
                        </configuration>
        </plugin>
    </plugins>
</build>
<dependencies>
    <dependency>
        <groupId>org.apache.jmeter</groupId>
        <artifactId>ApacheJMeter_core</artifactId>
        <version>3.3</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parsers</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.apache.jmeter</groupId>
        <artifactId>ApacheJMeter_java</artifactId>
        <version>3.3</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parsers</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

Any suggestions I can try or any mistakes you can spot, please let me know. If I need to put more information let me know. Really appreciate any help. thank you.

1 Answers1

0

in this part of your pom:

<propertiesUser>
   <host>${hostName}</host>
   <port>${portNumber}</port>
   <users>${Users}</users>
   <duration>${duration}</duration>
   <rampup>${rampUp}</rampup>
   <datafile>${test.data}</datafile>
</propertiesUser>

You use properties, but where are those properties set ?

Check the content of target/jmeter/logs/<your jmx file>.log or share them.

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • Hi, I am sorry I am trying to figure out how to share a file. Log file showing only the default values for those properties. for example ${__P(users,5)} it takes 5 in place of what I pass via maven. mvn -DUsers=10 and In log file: 2018-01-22 22:04:31,489 INFO o.a.j.t.ThreadGroup: Starting thread group... number=2 threads=5 ramp-up=5 perThread=1000.0 delayedStart=true – user1480332 Jan 23 '18 at 03:10