0

I set up a Jenkins to integrate the JMeter script. Using the Freestyle project in Jenkins, I enabled "This project is parameterized" to set a String parameters for the Threads, Loop_Count and Think Time.

However, when running the test for 40 users using the Build parameter in Jenkins, it looks like the # of threads/users are not correct that is being executed, the Samples that are being generated only 3 for most of the pages. Only the Homepage (which is the first page on the test) is only getting the correct # of Samples, but the rest of the URLS/pages are not correct. Below the actual output. Output

Can you please help what might the causing this issue, I already checked the Jmeter script and jenkins config and appears to be correct but still I'm getting the issue. Thanks for the help.

Omeng
  • 33
  • 1
  • 4

1 Answers1

0

Setting parameters in Jenkins itself is not sufficient to pass them to JMeter, you need to pass this parameterized value to JMeter startup script via -J command-line argument

-Jusers=%users%

enter image description here

End-to-end demo:

enter image description here

More information: Apache JMeter Properties Customization Guide

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I did pass the parameter to the Jmeter startup script through Execute Windows batch command line script and still getting the same result. Please advise. Here's the sample coomand: cd "C:\JMeter\apache-jmeter-5.4.1\bin" jmeter -Jusers=%Users% -JThink_Time=%Think_Time% -JLoop_count=%Loop_count% -jjmeter.save.saveservice.output_format=xml Please advise. – Omeng Apr 06 '21 at 01:24