You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2021/07/14 09:19:43 UTC

[Bug 65449] New: Add option to have JMeter UI embedded in another application

https://bz.apache.org/bugzilla/show_bug.cgi?id=65449

            Bug ID: 65449
           Summary: Add option to have JMeter UI embedded in another
                    application
           Product: JMeter
           Version: 5.4.1
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: anthony.goubard@japplis.com
  Target Milestone: JMETER_5.5

Created attachment 37951
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37951&action=edit
Apache JMeter embedded in IntelliJ IDEA

At the moment, JMeter assume that it is started with a JFrame or as non gui
mode. 
It would be nice to have an option to start JMeter in embedded mode to have it
included in another application. For example in a Java IDE.

Here are the changes needed to make JMeter embeddable:
 * New "embedded" start-up option (JMeter.java)
 * Parse the option in JMeter.java#start
 * Do not initialize JMeterUIDefaults and look and feel in JMeter.java#startGui
 * Do not show the JFrame in JMeter.java#startGui (setLocationRelativeTo,
setVisible, toFront)
 * Do not show or disallow the following menu:
 ** File -> Restart
 ** Options -> Look and Feel
 * Add a method to JMeter.java to get the JFrame or the JRootPane
 * Do not call System.exit if the start-up fails

Nice to have but could be solved with workaround:
 * Do not use the JFrame as parent component when opening a dialogue window. 
 ** Workaround calling GuiPackage.setMainFrame with frame of the main
application.
 * Do not assume that the context class loader of the current thread or of the
event dispatch thread contains the classpath like for example done in the menu
creation and searching for plug-ins. Prefer getClass().getClassLoader() or
MyObject.class.getClassLoader() in a static context. 
 ** Workaround change the context class loader of the thread starting JMeter
and of the Event Dispatch Thread which can be dangerous as the EDT is used
everywhere in an IDE for example.
 * NewDriver.java should first check the "jmeter.home" system property, as if
the main application is started from a main Jar file, NewDriver assume it's the
ApacheJMeter.jar which is not the case.
 ** Workaround change the "java.class.path" system property to have at least 2
entries before starting JMeter.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65449] Add option to have JMeter UI embedded in another application

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65449

--- Comment #1 from Anthony Goubard <an...@japplis.com> ---
The "* Do not use the JFrame as parent component when opening a dialogue
window." needs to be moved the the needed changes as setMainFrame uses the
MainFrame class and not JFrame.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65449] Add option to have JMeter UI embedded in another application

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65449

Anthony Goubard <an...@japplis.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 65449] Add option to have JMeter UI embedded in another application

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65449

Anthony Goubard <an...@japplis.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anthony.goubard@japplis.com

--- Comment #2 from Anthony Goubard <an...@japplis.com> ---
"Do not use the JFrame as parent component when opening a dialogue window"
doesn't seem to be a problem (needs more investigation). The
mainFrame.getLocationOnScreen() is failing as the mainFrame is not visible.

Also disable Zoom In and Zoom out actions in Embedded mode if we don't
initialize JMeterUIDefaults.

-- 
You are receiving this mail because:
You are the assignee for the bug.