apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.42k stars 2.1k forks source link

Include controllers do not seem to function in non-GUI mode #1682

Closed asfimport closed 18 years ago

asfimport commented 18 years ago

Richard Gaywood (Bug 38681): Please see attached script1.jmx (top-level test plan), component_google.jmx (test plan to be included), and run.bat (to run JMeter in non-GUI mode).

This test plan assumes the following structure: 1) Java in D:\jmeter\java\j2sdk1.4.2_07 2) JMeter in D:\jmeter\jakarta-jmeter-2.1.1 3) test plans in D:\jmeter\tests\test

To re-run these files, you will need to edit paths appropriately.

When run in GUI mode, the CSV report generated contains three samplers, as expected. When run in non-GUI mode through the batch command, the included file does not seem to be triggered, and the results file contains only a single line for the Yahoo sampler.

Severity: normal OS: Windows Server 2003

asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): Created attachment script1.jmx: Top-level test plan

script1.jmx ````xml org.apache.jmeter.config.gui.ArgumentsPanel org.apache.jmeter.config.Arguments User Defined Variables true org.apache.jmeter.control.gui.TestPlanGui false org.apache.jmeter.testelement.TestPlan Test Plan false true org.apache.jmeter.visualizers.ViewResultsFullVisualizer org.apache.jmeter.reporters.ResultCollector View Results Tree true true true true true true true false true true false false true false false false false false 0 , true saveConfig true false org.apache.jmeter.visualizers.SimpleDataWriter org.apache.jmeter.reporters.ResultCollector Simple Data Writer true false true false false false false false false false false false false false false false false false 0 , true saveConfig true D:\jmeter\tests\test\foo.csv false 1140102031000 org.apache.jmeter.threads.ThreadGroup true 1 false org.apache.jmeter.threads.gui.ThreadGroupGui org.apache.jmeter.control.gui.LoopControlPanel 1 org.apache.jmeter.control.LoopController Loop Controller true false Thread Group 1140102031000 continue 1 org.apache.jmeter.control.gui.TransactionControllerGui org.apache.jmeter.control.TransactionController load google true org.apache.jmeter.control.gui.IncludeControllerGui org.apache.jmeter.control.IncludeController Include Controller D:\jmeter\tests\test\component_google.jmx true org.apache.jmeter.protocol.http.sampler.HTTPSampler GET true true true org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel org.apache.jmeter.config.Arguments User Defined Variables true org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui load yahoo false www.yahoo.com false ````
asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): Created attachment component_google.jmx: Included test plan

component_google.jmx ````xml org.apache.jmeter.control.gui.LogicControllerGui org.apache.jmeter.control.GenericController Simple Controller true org.apache.jmeter.protocol.http.sampler.HTTPSampler GET true true true org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel org.apache.jmeter.config.Arguments User Defined Variables true org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui HTTP Request false www.google.co.uk false ````
asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): Created attachment run.bat: Batch file to run JMeter in non-gui mode

run.bat ````batch @echo off set JAVA_HOME=D:\jmeter\Java\j2sdk1.4.2_07 set JM_HOME=D:\jmeter\jakarta-jmeter-2.1.1 set JM_TESTS=D:\jmeter\tests\test set HEAP=-Xms256m -Xmx256m set NEW=-XX:NewSize=128m -XX:MaxNewSize=128m set SURVIVOR=-XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50% set TENURING=-XX:MaxTenuringThreshold=2 set EVACUATION=-XX:MaxLiveObjectEvacuationRatio=20% set RMIGC=-Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000 set PERM=-XX:PermSize=64m -XX:MaxPermSize=64m set DEBUG=-verbose:gc -XX:+PrintTenuringDistribution set ARGS=%HEAP% %NEW% %SURVIVOR% %TENURING% %EVACUATION% %RMIGC% %PERM% %DEBUG% %DDRAW% cd %JM_TESTS% d: %JAVA_HOME%\bin\javaw.exe %ARGS% -jar %JM_HOME%\bin\ApacheJMeter.jar -n -t script1.jmx ````
asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): Created attachment results_gui.csv: Results file from GUI run

asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): Created attachment results_nongui.csv: Results file from non-GUI run

asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): Created attachment jmeter_gui.log: Log file from GUI run

jmeter_gui.log ```` 2006/02/16 15:19:28 INFO - jmeter.util.JMeterUtils: Setting Locale to en_GB 2006/02/16 15:19:28 INFO - jmeter.JMeter: Version 2.1.1.20060208 2006/02/16 15:19:28 INFO - jmeter.JMeter: java.version=1.4.2_07 2006/02/16 15:19:28 INFO - jmeter.JMeter: Locale=English (United Kingdom) 2006/02/16 15:19:28 INFO - jmeter.JMeter: Copyright (c) 1998-2005 The Apache Software Foundation 2006/02/16 15:19:28 INFO - jmeter.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties 2006/02/16 15:19:30 INFO - jmeter.protocol.http.sampler.AccessLogSamplerBeanInfo: Entered access log sampler bean info 2006/02/16 15:19:30 INFO - jmeter.protocol.http.sampler.AccessLogSamplerBeanInfo: found parsers: [org.apache.jmeter.protocol.http.util.accesslog.OrderPreservingLogParser, org.apache.jmeter.protocol.http.util.accesslog.SharedTCLogParser, org.apache.jmeter.protocol.http.util.accesslog.TCLogParser] 2006/02/16 15:19:30 INFO - jmeter.protocol.http.sampler.AccessLogSamplerBeanInfo: Got to end of access log samper bean info init 2006/02/16 15:19:31 INFO - jmeter.samplers.SampleResult: Note: Sample TimeStamps are END times 2006/02/16 15:19:31 INFO - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1 2006/02/16 15:19:37 INFO - jmeter.gui.action.Load: Loading file: D:\jmeter\tests\test\script1.jmx 2006/02/16 15:19:37 INFO - jmeter.protocol.http.sampler.HTTPSampler2: httpsampler2.basicauth=false 2006/02/16 15:19:37 INFO - jmeter.save.SaveService: Using SaveService properties file 1.7 2006/02/16 15:19:37 INFO - jmeter.save.SaveService: All converter versions present and correct 2006/02/16 15:19:37 INFO - jmeter.control.IncludeController: loadIncludedElements -- try to load included module 2006/02/16 15:19:38 INFO - jmeter.control.IncludeController: loadIncludedElements -- try to load included module 2006/02/16 15:19:38 INFO - jmeter.engine.StandardJMeterEngine: Running the test! 2006/02/16 15:19:38 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,local) 2006/02/16 15:19:38 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group. Ramp up = 1. 2006/02/16 15:19:38 INFO - jmeter.engine.StandardJMeterEngine: Continue on error 2006/02/16 15:19:38 WARN - jmeter.threads.JMeterThread: jmeterthread.startearlier=true (see jmeter.properties) 2006/02/16 15:19:38 INFO - jmeter.control.IncludeController: loadIncludedElements -- try to load included module 2006/02/16 15:19:38 INFO - jmeter.threads.JMeterThread: Thread Thread Group 1-1 started 2006/02/16 15:19:40 INFO - jmeter.threads.JMeterThread: Thread Thread Group 1-1 is done 2006/02/16 15:19:40 INFO - jmeter.engine.StandardJMeterEngine: Ending thread 0 2006/02/16 15:19:40 INFO - jmeter.engine.StandardJMeterEngine: Stopping test 2006/02/16 15:19:40 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test 2006/02/16 15:19:40 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,local) 2006/02/16 15:19:40 INFO - jmeter.engine.StandardJMeterEngine: Test has ended ````
asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): Created attachment results_nongui.csv: Log file from non-GUI run

asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): Running the test plans in and out of the GUI with DEBUG level loggging gives, for part of the log, the results below. The key difference is the error "jmeter.control.TransactionController: Could not fetch SamplePackage" in the non-GUI run, which presumably is something to do with the cause of this bug.

non-GUI:-

2006/02/16 15:51:49 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 2006/02/16 15:51:49 DEBUG - jmeter.control.TransactionController: Thread-0 load google +++++++++++++++++++++++++++++ 2006/02/16 15:51:49 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.TransactionController 2006/02/16 15:51:49 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.IncludeController 2006/02/16 15:51:49 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.TransactionController 2006/02/16 15:51:49 DEBUG - jmeter.control.TransactionController: Thread-0 load google -----------------------------2 2006/02/16 15:51:49 WARN - jmeter.control.TransactionController: Could not fetch SamplePackage 2006/02/16 15:51:49 DEBUG - jmeter.control.TransactionController: Thread-0 load google -----------------------------2 2006/02/16 15:51:49 DEBUG - jmeter.control.TransactionController: Thread-0 load google already called 2006/02/16 15:51:49 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 2006/02/16 15:51:49 DEBUG - jmeter.protocol.http.sampler.HTTPSampler: Start : samplehttp://www.yahoo.com/ 2006/02/16 15:51:50 DEBUG - jmeter.protocol.http.sampler.HTTPSampler: End : sample 2006/02/16 15:51:50 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 2006/02/16 15:51:50 INFO - jmeter.threads.JMeterThread: Thread Thread Group 1-1 is done

GUI:-

2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 2006/02/16 15:54:44 DEBUG - jmeter.control.TransactionController: Thread-3 load google +++++++++++++++++++++++++++++ 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.TransactionController 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.IncludeController 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.GenericController 2006/02/16 15:54:44 DEBUG - jmeter.protocol.http.sampler.HTTPSampler: Start : samplehttp://www.google.co.uk/ 2006/02/16 15:54:44 DEBUG - jmeter.protocol.http.sampler.HTTPSampler: End : sample 2006/02/16 15:54:44 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: Start : updateGui1 2006/02/16 15:54:44 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: updateGui1 : sample result - HTTP Request 2006/02/16 15:54:44 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: End : updateGui1 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.TransactionController 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.IncludeController 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.GenericController 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.IncludeController 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.TransactionController 2006/02/16 15:54:44 DEBUG - jmeter.control.TransactionController: Thread-3 load google -----------------------------3 2006/02/16 15:54:44 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: Start : updateGui1 2006/02/16 15:54:44 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: updateGui1 : sample result - load google 2006/02/16 15:54:44 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: End : updateGui1 2006/02/16 15:54:44 DEBUG - jmeter.control.TransactionController: Thread-3 load google -----------------------------3 2006/02/16 15:54:44 DEBUG - jmeter.control.TransactionController: Thread-3 load google already called 2006/02/16 15:54:44 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 2006/02/16 15:54:44 DEBUG - jmeter.protocol.http.sampler.HTTPSampler: Start : samplehttp://www.yahoo.com/ 2006/02/16 15:54:48 DEBUG - jmeter.protocol.http.sampler.HTTPSampler: End : sample 2006/02/16 15:54:48 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: Start : updateGui1 2006/02/16 15:54:48 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: updateGui1 : sample result - load yahoo 2006/02/16 15:54:48 DEBUG - jmeter.visualizers.ViewResultsFullVisualizer: End : updateGui1 2006/02/16 15:54:48 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 2006/02/16 15:54:48 INFO - jmeter.threads.JMeterThread: Thread Thread Group 1-1 is done

asfimport commented 18 years ago

Richard Gaywood (migrated from Bugzilla): This bug has also been discussed on jmeter-users:

http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/200510.mbox/%3c20051005001421.75069.qmail@web35805.mail.mud.yahoo.com%3e

I am not sure if that discussion lead to a bug report being opened or not. If it did, this bug should be marked as a duplicate of that one.

asfimport commented 18 years ago

peter lin (migrated from Bugzilla): Looking at this a bit, I think the fix might be as simple as implementing next() for IncludeController and have it check to see if the included modules have been loaded.

peter

asfimport commented 18 years ago

Sebb (migrated from Bugzilla): Checked a potential fix into the 2.1 branch.

This is in the nightly build: 2-1.20060315 - please see if it works for you.