Please let me know whether it is possible to run jmeter script from eclipse? If yes Please let me know the process.
5
votes
First result when searching on google people.apache.org/~mkostrze/jmeter-eclipse/index.html
- Chetter Hummin
I have already tried this but the process defined is not working.
- Yash Varshney
possible duplicate of Import JMeter project (ant) to Eclipse Juno
- UBIK LOAD PACK
I shall try the instruction from: people.apache.org/~mkostrze/jmeter-eclipse/index.html But i found error as: Error validating location: "Could not connect to :pserver:[email protected]:/home/cvspublic: Cannot connect to host: Connection timed out: connect" Keep location anyway?
- Ripon Al Wasim
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
1 Answers
10
votes
Use Eclipse External Tool
- Eclipse menu: Run -> External Tools -> External Tools Configuration...
- The dialog External Tools Configuration opens
- From the tree on the left select Program
- Use left mouse button and select from the mouse menu New or use the left icon (above the tree) and select New launch configuration
- On the right side of the tree, opens the panel, where details of this new lauch configuration can be filled in
- Enter as Name: JMeter sample
- 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) - 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-projectis shown) - 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
- Enter as Arguments:
-t src\test\jmeter\sample.jmx(the path of the JMeter script to launch) - 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.