Using JMeter with Jenkins

  1. Run the file: <YOUR-JMETER-PATH>>/bin/jmeter.sh to open the JMeter GUI. For example, /usr/jmeter/bin/jmeter.sh would be used in this example.
    In a definitive installation, you can set these commands to your path system or system variables.

    For Windows users the file will be jmeter.bat.

  2. From the JMeter GUI, go to File, and then select New.

  3. Enter a name for your test plan.

  4. On the left side of the screen, using the right or secondary select with your mouse, select your test plan.
    Follow this path: Add > Thread(Users) > Thread Group, and select it.

    Adding a Thread Group to the test plan.

  5. In Thread Group, increase the Number of Threads (users) to five and the Loop Count to two.

  6. On the left side of the screen, right or secondary select Thread Group with your mouse, then follow this path: Add > Sampler > HTTP Request, and select the HTTP Request option.

    Thread Group

  7. In HTTP Request, enter the Name of your test, the Server Name or IP, and the Path context. For example, here we would use Installing, www.jenkins.io, and /doc/book/installing/.

    HTTP Request sample

  8. Repeat steps six and seven two more times to different context/pages. For example, we will use www.jenkins.io/node.
    Now our plan has three things to test.

  9. To add a visual report, right or secondary select your Thread Group, then follow the path: Add > Listener > View results in table.
    Select the View Results in Table option.

    Save and run test plan

  10. To save the test plan, select the Save (disk) icon in the upper left side of the screen or go to File > Save, and enter a name for the test plan with a .jmx extension.
    For example: jenkins.io.jml.

Xổ số miền Bắc