5

Please let me know whether it is possible to run jmeter script from eclipse? If yes Please let me know the process.

Yash Varshney
  • 365
  • 1
  • 5
  • 16
  • 1
    First result when searching on google http://people.apache.org/~mkostrze/jmeter-eclipse/index.html – Chetter Hummin Feb 07 '13 at 10:27
  • I have already tried this but the process defined is not working. – Yash Varshney Feb 07 '13 at 11:50
  • possible duplicate of [Import JMeter project (ant) to Eclipse Juno](http://stackoverflow.com/questions/13725756/import-jmeter-project-ant-to-eclipse-juno) – UBIK LOAD PACK Feb 09 '13 at 14:30
  • I shall try the instruction from: http://people.apache.org/~mkostrze/jmeter-eclipse/index.html But i found error as: Error validating location: "Could not connect to :pserver:anoncvs@cvs.apache.org:/home/cvspublic: Cannot connect to host: Connection timed out: connect" Keep location anyway? – Ripon Al Wasim Aug 18 '14 at 12:07
  • The link people.apache.org/~mkostrze/jmeter-eclipse/index.html is about launching jmeter from within the eclipse. But what we want to know is given a jmx script, is there a way to execute it simply as we execute a Junit from the eclipse IDE. – Praneeth Sep 12 '14 at 06:17
  • Are you only thinking to run JMeter from eclipse or want a proper integration of JMeter in Eclipse. I have written a blog on how to integrate JMeter in Eclipse (without errors) which will help in extending JMeter and enjoying all advantages of Eclipse IDE. [http://p3lang.com/2016/03/configure-jmeter-in-eclipse/](http://p3lang.com/2016/03/configure-jmeter-in-eclipse/) – Abhishek Aggarwal May 16 '16 at 14:45

1 Answers1

11

Use Eclipse External Tool

  1. Eclipse menu: Run -> External Tools -> External Tools Configuration...
  2. The dialog External Tools Configuration opens
  3. From the tree on the left select Program
  4. Use left mouse button and select from the mouse menu New or use the left icon (above the tree) and select New launch configuration
  5. On the right side of the tree, opens the panel, where details of this new lauch configuration can be filled in
  6. Enter as Name: JMeter sample
  7. Enter as Location: The location where JMeter is installed (on windows something like C:\Program Files\apache\jmeter\bin\jmeter.bat) (on Linux like /opt/apache/jmeter/bin/jmeter)
  8. Enter as Working Directory: ${workspace_loc:/jmeter-project} (use the button Browse Workspance..., to select the project, in your workspace where the JMeter script are located. Here the project jmeter-project is shown)
  9. Close the dialog by using the button Run, which should launch JMeter.

Info The icon Stop, does not work, as this actually launches a script, which launches the Java application JMeter.

Optionally add parameters

  1. Enter as Arguments: -t src\test\jmeter\sample.jmx (the path of the JMeter script to launch)
  2. Enter as Arguments: -q src\test\jmeter\environment.properties (some external properties file, use ${__P(key-name)})

See JMeter options and Parameterising Tests for the details.

Verhagen
  • 3,885
  • 26
  • 36
  • Is there a possibility that we can run this in maven project? – AVI Jun 25 '22 at 11:43
  • 1
    @AVI Running JMeter from a Maven project is possible as well. Have a look at this article https://medium.com/@gabriel.starczewski/running-jmeter-tests-with-maven-and-maven-wrapper-6725aa025bd9 – Verhagen Jun 27 '22 at 09:01