Differences between revisions 3 and 4
Revision 3 as of 2007-02-03 12:48:13
Size: 2488
Editor: JMeterAdmin
Comment: Some fixes including new code header
Revision 4 as of 2009-09-20 21:56:34
Size: 2490
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The ["JMeterAndEclipseHowTo"] describes the basics of setting up a JMeter project in Eclipse and configuring Eclipse to run JMeter successfully. The [[JMeterAndEclipseHowTo]] describes the basics of setting up a JMeter project in Eclipse and configuring Eclipse to run JMeter successfully.
Line 6: Line 6:
In order to match the conventions agreed to by JMeter committers in January 2003 (see [http://www.mail-archive.com/jmeter-dev@jakarta.apache.org/msg03176.html the mailing list archive]) the following settings are recommended. These settings are in Eclipse 2.1.1 -- earlier or later versions probably have similar settings, but possibly in different places. In order to match the conventions agreed to by JMeter committers in January 2003 (see [[http://www.mail-archive.com/jmeter-dev@jakarta.apache.org/msg03176.html|the mailing list archive]]) the following settings are recommended. These settings are in Eclipse 2.1.1 -- earlier or later versions probably have similar settings, but possibly in different places.

This page describes information about using Eclipse to develop JMeter. You don't have to use Eclipse, but many of us do. So here are some tips for getting it set up.

The JMeterAndEclipseHowTo describes the basics of setting up a JMeter project in Eclipse and configuring Eclipse to run JMeter successfully.

Formatting files

In order to match the conventions agreed to by JMeter committers in January 2003 (see the mailing list archive) the following settings are recommended. These settings are in Eclipse 2.1.1 -- earlier or later versions probably have similar settings, but possibly in different places.

  • Select Window | Preferences. Choose Java | Code Formatter. Use the following options in the "New Lines" tab. (Options which aren't listed are up to you to decide.)
    • Insert a new line before an opening brace (selected)

    • Insert new lines in control statements (selected)

    • Insert new line between 'else if' (deselected)

    • Insert a new line inside an empty block (selected)

  • In the "Line Splitting" tab, "Maximum line length" should be set to 80.
  • In the "Style" tab, use the following options:
    • Insert space after a cast (selected)

    • Insert tabs for indentation, not spaces (deselected)

    • Number of spaces representing an indentation level: 4
  • In Java | Code Generation, use patterns similar to the following in the "Code and Comments" section:
  • In Java | Editor, use the following settings:
    • Print margin column: 80
    • Show print margin (selected) (This way you can see where 80 columns is at when writing code and comments.)

Multiple Workspaces

Most Eclipse formatting settings are managed at the workspace level. If you work on other projects in addition to JMeter, you probably don't want the JMeter formatting to apply to your other projects. One way to manage this is to set up multiple Eclipse workspaces -- one for JMeter, and one (or more) for other projects. To use multiple workspaces, simply start eclipse with the "-data" parameter:

    eclipse -data c:\workspace_JMeter 

You could also create a batch file, shell script, or Windows shortcut to automatically specify the workspace so you don't have to type it each time.

JMeterEclipse (last edited 2009-09-20 21:56:34 by localhost)