https://issues.apache.org/bugzilla/show_bug.cgi?id=50034
Summary: Provide API for running JMeter
Product: JMeter
Version: 2.4
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: Main
AssignedTo: [email protected]
ReportedBy: [email protected]
To enable effective test automation with Jmeter we would like to use Jmeter in
non-gui mode calling it directly in Java app. This is very similar scenario as
in case maven-jmeter-plugin...
Currently we have to:
1. create new JMeter()
2. invoke start with command line args.
3. parse JMeter log to find the results.
4. change security manager to capture System.exit calls
5. wait for all of the threads that it spawned to exit
We would like to:
1. create new JMeterNonGUI()
2. invoke runTest with all arguments passed as appropriate objects (no need to
wrap and parse them)
3. wait for runTest to end (it should execute all tests)
4. read test results returned by runTest
Example:
JMeterNonGUI jmeter = new JMeterNonGUI();
TestResults results = jmeter.runTests(jmxTestFile);
I propose to:
- extract from JMeter class JMeterGUI class responsible for starting GUI
version of JMeter
- extract from JMeter class JMeterNonGUI class responsible for starting non-GUI
version of JMeter
- refactor the code so that JMeter class will be responsible only for parsing
command line arguments and delegating JMeter start to appropriate class
JMeterGUI or JMeterNonGUI
- create public JMeterNonGUI.runTests method that will block execution until
test end and will gather test results to some TestResults list (the hardest
part?)
- replace all System.exit calls with call to some SystemExitHandlerInterface
that in case of non-GUI method can be implemented without using System.exit
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]