jakarta-jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tusharbha...@discoverfinancial.com
Subject Non-GUI Driver
Date Fri, 22 Jun 2001 20:07:13 GMT
I have been trying to run JMeter without using swing and it seems a number
of other people are interested in this too. The attached code would allow
this to work. Since JMeter was tightly integrated with Swing, I made change
a few preexisting classes and added three of my own. The changes are
described ahead.
The best way to use this is to create the JMeter data file  (eg
TestPlan.jmx) by using the swing based application and then run the NonGui
version by passing in the name of this file.

JMeter has problems reading special XML characters (that may be found in
HTTP gets/posts). The save on these is working fine but  the reading part
has not made its way to CVS yet.The attached files contain this code too.

Finally I have included a windows batch file (nongui.bat) that would allow
the testing of this new functionality.

Summary of changes:

1) Special XML characters not being read correctly(they are removed from
the data) and removing the extra newlines that show up in the swing
components.
Changes in :
org.apache.jmeter.save.handlers.AbstractConfigElementHandler.java &
org.apache.jmeter.save.handlers.ArgumentHandler.java.

2) If using a GET method, URLEncode should be invoked on the item.getValue
(...) call.
Changes in org.apache.jmeter.protocol.config.URLConfig.java.

3) Menus are loaded statically leading to a dependence on Swing. The
following classes contain changes such that the menus would be loaded
during the first call to getAddList method. NonGui driver does not invoke
getAddList method.
Changes in : org.apache.jmeter.control.GenericController.java
org.apache.jmeter.control.WorkBench.java,
org.apache.jmeter.protocol.http.control.HttpTestSample.java &
org.apache.jmeter.threads.ThreadGroup.java

4) Classes added.
org.apache.jmeter.NonGuiDriver.java: Contains code to setup JMeter and read
the input file, start the test etc.
org.apache.jmeter.gui.tree.NonGuiTree.java &
org.apache.jmeter.gui.tree.NonGuiTree.java : These mimic the behavior of
the Swing tree component. and also support JMeter traversal of the tree for
compile etc. Documentation is included in these classes.

And now the disclaimer: I have not extensively tested this out but it works
with my stuff. Also, I have yet to test this out with any visualizers but
am pretty sure that it would fail in a non-swing environment. The Filer
also are also throwing a NullPointerException and I am looking into that.
Questions are welcome
Tushar

Enclosed: Changes.jar, nongui.bat
(See attached file: nongui.bat)(See attached file: Changes.jar)


Mime
View raw message