You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by anishjp <an...@gmail.com> on 2015/11/09 16:29:54 UTC
While controller with CSV Data Set Config
Hi guys
Created a simple while controller to read from the CSV Data set config. Just
want the sampler to execute with all the lines from the test data file one
by one.
test data.txt
2345,23434
6743,39478
7849,93847
Structure is as below
+Thread Group
- Number of threads - 1
- Loop count - 1
++While Controller
- Condition - ${terminalid} != "7849"
+++CSV Data Set Config
- Variable names - terminalid, merchantid
- Delimiter - ,
- Recycle on EOF - False
- Stop thread on EOF - True
- Sharing mode - All threads
+++HTTP Request
+++View Results Tree
In the results tree, there is only result with the first line from the test
data file. It is not reading the values from the next line. Is my condition
right?
My jmeter.log says
2015/11/09 17:23:58 INFO - jmeter.util.JMeterUtils: Setting Locale to en_ZA
2015/11/09 17:23:58 INFO - jmeter.JMeter: Loading user properties from:
C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin\user.properties
2015/11/09 17:23:58 INFO - jmeter.JMeter: Loading system properties from:
C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin\system.properties
2015/11/09 17:23:58 INFO - jmeter.JMeter: Copyright (c) 1998-2015 The
Apache Software Foundation
2015/11/09 17:23:58 INFO - jmeter.JMeter: Version 2.13 r1665067
2015/11/09 17:23:58 INFO - jmeter.JMeter: java.version=1.8.0_40
2015/11/09 17:23:58 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM)
Client VM
2015/11/09 17:23:58 INFO - jmeter.JMeter: os.name=Windows 7
2015/11/09 17:23:58 INFO - jmeter.JMeter: os.arch=x86
2015/11/09 17:23:58 INFO - jmeter.JMeter: os.version=6.1
2015/11/09 17:23:58 INFO - jmeter.JMeter: file.encoding=Cp1252
2015/11/09 17:23:58 INFO - jmeter.JMeter: Default Locale=English (South
Africa)
2015/11/09 17:23:58 INFO - jmeter.JMeter: JMeter Locale=English (South
Africa)
2015/11/09 17:23:58 INFO - jmeter.JMeter:
JMeterHome=C:\Users\anish.philip\Softwares\apache-jmeter-2.13
2015/11/09 17:23:58 INFO - jmeter.JMeter: user.dir
=C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin
2015/11/09 17:23:58 INFO - jmeter.JMeter: PWD
=C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin
2015/11/09 17:23:58 INFO - jmeter.JMeter: IP: 10.230.6.42 Name: aphilip01
FullName: 10.230.6.42
2015/11/09 17:23:58 INFO - jmeter.gui.action.LookAndFeelCommand: Using look
and feel: javax.swing.plaf.metal.MetalLookAndFeel [Metal, CrossPlatform]
2015/11/09 17:23:58 INFO - jmeter.JMeter: Loaded icon properties from
org/apache/jmeter/images/icon.properties
2015/11/09 17:23:59 INFO - jmeter.engine.util.CompoundVariable: Note:
Function class names must contain the string: '.functions.'
2015/11/09 17:23:59 INFO - jmeter.engine.util.CompoundVariable: Note:
Function class names must not contain the string: '.gui.'
2015/11/09 17:23:59 INFO - jmeter.util.BSFTestElement: Registering JMeter
version of JavaScript engine as work-round for BSF-22
2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
Cannot find .className property for htmlParser, using default
2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for text/html is
2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for application/xhtml+xml is
2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for application/xml is
2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for text/xml is
2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for text/vnd.wap.wml is
org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2015/11/09 17:23:59 INFO - jmeter.gui.util.MenuFactory: Skipping
org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui
2015/11/09 17:23:59 INFO - jmeter.gui.util.MenuFactory: Skipping
org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui
2015/11/09 17:24:00 INFO - jorphan.exec.KeyToolUtils: keytool found at
'C:\Program Files (x86)\Java\jre1.8.0_40\bin\keytool'
2015/11/09 17:24:00 INFO - jmeter.protocol.http.proxy.ProxyControl: HTTP(S)
Test Script Recorder SSL Proxy will use keys that support embedded 3rd party
resources in file
C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin\proxyserver.jks
2015/11/09 17:24:00 INFO - jmeter.samplers.SampleResult: Note: Sample
TimeStamps are START times
2015/11/09 17:24:00 INFO - jmeter.samplers.SampleResult:
sampleresult.default.encoding is set to ISO-8859-1
2015/11/09 17:24:00 INFO - jmeter.samplers.SampleResult:
sampleresult.useNanoTime=true
2015/11/09 17:24:00 INFO - jmeter.samplers.SampleResult:
sampleresult.nanoThreadSleep=5000
2015/11/09 17:24:32 INFO - jmeter.services.FileServer: Default
base='C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin'
2015/11/09 17:24:32 INFO - jmeter.gui.action.Load: Loading file:
C:\Users\anish.philip\Desktop\Jmeter projects\test.jmx
2015/11/09 17:24:32 INFO - jmeter.services.FileServer: Set new
base='C:\Users\anish.philip\Desktop\Jmeter projects'
2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Testplan (JMX) version:
2.2. Testlog (JTL) version: 2.2
2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Using SaveService
properties file encoding UTF-8
2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Using SaveService
properties file version 1656252
2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Using SaveService
properties version 2.8
2015/11/09 17:24:32 INFO - jmeter.save.SaveService: All converter versions
present and correct
2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Loading file:
C:\Users\anish.philip\Desktop\Jmeter projects\test.jmx
2015/11/09 17:24:32 INFO - jmeter.services.FileServer: Set new
base='C:\Users\anish.philip\Desktop\Jmeter projects'
2015/11/09 17:24:43 INFO - jmeter.engine.StandardJMeterEngine: Listeners
will be started after enabling running version
2015/11/09 17:24:43 INFO - jmeter.engine.StandardJMeterEngine: To revert to
the earlier behaviour, define jmeterengine.startlistenerslater=false
2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Running the
test!
2015/11/09 17:24:44 INFO - jmeter.samplers.SampleEvent: List of
sample_variables: []
2015/11/09 17:24:44 INFO - jmeter.samplers.SampleEvent: List of
sample_variables: []
2015/11/09 17:24:44 INFO - jmeter.gui.util.JMeterMenuBar:
setRunning(true,*local*)
2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Starting
ThreadGroup: 1 : Number of Users
2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Starting 1
threads for group Number of Users.
2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Thread will
continue on error
2015/11/09 17:24:44 INFO - jmeter.threads.ThreadGroup: Starting thread
group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread:
jmeterthread.startearlier=true (see jmeter.properties)
2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread: Running
PostProcessors in forward order
2015/11/09 17:24:44 INFO - jmeter.threads.ThreadGroup: Started thread group
number 1
2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: All thread
groups have been started
2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread: Thread started:
Number of Users 1-1
2015/11/09 17:24:44 INFO - jmeter.services.FileServer: Stored:
c:\Users\anish.philip\Desktop\Jmeter projects\test data.txt
2015/11/09 17:24:44 INFO - jmeter.protocol.http.sampler.HTTPHCAbstractImpl:
Local host = aphilip01
2015/11/09 17:24:44 INFO - jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP
request retry count = 0
2015/11/09 17:24:44 INFO - jmeter.protocol.http.sampler.HTTPHC4Impl:
Setting up HTTPS TrustAll scheme
2015/11/09 17:24:44 INFO - jmeter.util.JsseSSLManager: Using default SSL
protocol: TLS
2015/11/09 17:24:44 INFO - jmeter.util.JsseSSLManager: SSL session context:
per-thread
2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread: Thread is done:
Number of Users 1-1
2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread: Thread finished:
Number of Users 1-1
2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Notifying
test listeners of end of test
2015/11/09 17:24:44 INFO - jmeter.services.FileServer: Close:
c:\Users\anish.philip\Desktop\Jmeter projects\test data.txt
2015/11/09 17:24:44 INFO - jmeter.gui.util.JMeterMenuBar:
setRunning(false,*local*)
What am I doing wrong?
--
View this message in context: http://jmeter.512774.n5.nabble.com/While-controller-with-CSV-Data-Set-Config-tp5723429.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Re: While controller with CSV Data Set Config
Posted by sebb <se...@gmail.com>.
Have you tried adding a debug sampler to show the value of the variables?
On 9 November 2015 at 15:29, anishjp <an...@gmail.com> wrote:
> Hi guys
>
> Created a simple while controller to read from the CSV Data set config. Just
> want the sampler to execute with all the lines from the test data file one
> by one.
>
> test data.txt
>
> 2345,23434
> 6743,39478
> 7849,93847
>
> Structure is as below
> +Thread Group
> - Number of threads - 1
> - Loop count - 1
> ++While Controller
> - Condition - ${terminalid} != "7849"
> +++CSV Data Set Config
> - Variable names - terminalid, merchantid
> - Delimiter - ,
> - Recycle on EOF - False
> - Stop thread on EOF - True
> - Sharing mode - All threads
> +++HTTP Request
> +++View Results Tree
>
> In the results tree, there is only result with the first line from the test
> data file. It is not reading the values from the next line. Is my condition
> right?
>
> My jmeter.log says
>
> 2015/11/09 17:23:58 INFO - jmeter.util.JMeterUtils: Setting Locale to en_ZA
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: Loading user properties from:
> C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin\user.properties
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: Loading system properties from:
> C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin\system.properties
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: Copyright (c) 1998-2015 The
> Apache Software Foundation
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: Version 2.13 r1665067
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: java.version=1.8.0_40
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM)
> Client VM
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: os.name=Windows 7
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: os.arch=x86
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: os.version=6.1
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: file.encoding=Cp1252
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: Default Locale=English (South
> Africa)
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: JMeter Locale=English (South
> Africa)
> 2015/11/09 17:23:58 INFO - jmeter.JMeter:
> JMeterHome=C:\Users\anish.philip\Softwares\apache-jmeter-2.13
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: user.dir
> =C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: PWD
> =C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: IP: 10.230.6.42 Name: aphilip01
> FullName: 10.230.6.42
> 2015/11/09 17:23:58 INFO - jmeter.gui.action.LookAndFeelCommand: Using look
> and feel: javax.swing.plaf.metal.MetalLookAndFeel [Metal, CrossPlatform]
> 2015/11/09 17:23:58 INFO - jmeter.JMeter: Loaded icon properties from
> org/apache/jmeter/images/icon.properties
> 2015/11/09 17:23:59 INFO - jmeter.engine.util.CompoundVariable: Note:
> Function class names must contain the string: '.functions.'
> 2015/11/09 17:23:59 INFO - jmeter.engine.util.CompoundVariable: Note:
> Function class names must not contain the string: '.gui.'
> 2015/11/09 17:23:59 INFO - jmeter.util.BSFTestElement: Registering JMeter
> version of JavaScript engine as work-round for BSF-22
> 2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
> Cannot find .className property for htmlParser, using default
> 2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
> Parser for text/html is
> 2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
> Parser for application/xhtml+xml is
> 2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
> Parser for application/xml is
> 2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
> Parser for text/xml is
> 2015/11/09 17:23:59 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:
> Parser for text/vnd.wap.wml is
> org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
> 2015/11/09 17:23:59 INFO - jmeter.gui.util.MenuFactory: Skipping
> org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui
> 2015/11/09 17:23:59 INFO - jmeter.gui.util.MenuFactory: Skipping
> org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui
> 2015/11/09 17:24:00 INFO - jorphan.exec.KeyToolUtils: keytool found at
> 'C:\Program Files (x86)\Java\jre1.8.0_40\bin\keytool'
> 2015/11/09 17:24:00 INFO - jmeter.protocol.http.proxy.ProxyControl: HTTP(S)
> Test Script Recorder SSL Proxy will use keys that support embedded 3rd party
> resources in file
> C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin\proxyserver.jks
> 2015/11/09 17:24:00 INFO - jmeter.samplers.SampleResult: Note: Sample
> TimeStamps are START times
> 2015/11/09 17:24:00 INFO - jmeter.samplers.SampleResult:
> sampleresult.default.encoding is set to ISO-8859-1
> 2015/11/09 17:24:00 INFO - jmeter.samplers.SampleResult:
> sampleresult.useNanoTime=true
> 2015/11/09 17:24:00 INFO - jmeter.samplers.SampleResult:
> sampleresult.nanoThreadSleep=5000
> 2015/11/09 17:24:32 INFO - jmeter.services.FileServer: Default
> base='C:\Users\anish.philip\Softwares\apache-jmeter-2.13\bin'
> 2015/11/09 17:24:32 INFO - jmeter.gui.action.Load: Loading file:
> C:\Users\anish.philip\Desktop\Jmeter projects\test.jmx
> 2015/11/09 17:24:32 INFO - jmeter.services.FileServer: Set new
> base='C:\Users\anish.philip\Desktop\Jmeter projects'
> 2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Testplan (JMX) version:
> 2.2. Testlog (JTL) version: 2.2
> 2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Using SaveService
> properties file encoding UTF-8
> 2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Using SaveService
> properties file version 1656252
> 2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Using SaveService
> properties version 2.8
> 2015/11/09 17:24:32 INFO - jmeter.save.SaveService: All converter versions
> present and correct
> 2015/11/09 17:24:32 INFO - jmeter.save.SaveService: Loading file:
> C:\Users\anish.philip\Desktop\Jmeter projects\test.jmx
> 2015/11/09 17:24:32 INFO - jmeter.services.FileServer: Set new
> base='C:\Users\anish.philip\Desktop\Jmeter projects'
> 2015/11/09 17:24:43 INFO - jmeter.engine.StandardJMeterEngine: Listeners
> will be started after enabling running version
> 2015/11/09 17:24:43 INFO - jmeter.engine.StandardJMeterEngine: To revert to
> the earlier behaviour, define jmeterengine.startlistenerslater=false
> 2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Running the
> test!
> 2015/11/09 17:24:44 INFO - jmeter.samplers.SampleEvent: List of
> sample_variables: []
> 2015/11/09 17:24:44 INFO - jmeter.samplers.SampleEvent: List of
> sample_variables: []
> 2015/11/09 17:24:44 INFO - jmeter.gui.util.JMeterMenuBar:
> setRunning(true,*local*)
> 2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Starting
> ThreadGroup: 1 : Number of Users
> 2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Starting 1
> threads for group Number of Users.
> 2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Thread will
> continue on error
> 2015/11/09 17:24:44 INFO - jmeter.threads.ThreadGroup: Starting thread
> group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
> 2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread:
> jmeterthread.startearlier=true (see jmeter.properties)
> 2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread: Running
> PostProcessors in forward order
> 2015/11/09 17:24:44 INFO - jmeter.threads.ThreadGroup: Started thread group
> number 1
> 2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: All thread
> groups have been started
> 2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread: Thread started:
> Number of Users 1-1
> 2015/11/09 17:24:44 INFO - jmeter.services.FileServer: Stored:
> c:\Users\anish.philip\Desktop\Jmeter projects\test data.txt
> 2015/11/09 17:24:44 INFO - jmeter.protocol.http.sampler.HTTPHCAbstractImpl:
> Local host = aphilip01
> 2015/11/09 17:24:44 INFO - jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP
> request retry count = 0
> 2015/11/09 17:24:44 INFO - jmeter.protocol.http.sampler.HTTPHC4Impl:
> Setting up HTTPS TrustAll scheme
> 2015/11/09 17:24:44 INFO - jmeter.util.JsseSSLManager: Using default SSL
> protocol: TLS
> 2015/11/09 17:24:44 INFO - jmeter.util.JsseSSLManager: SSL session context:
> per-thread
> 2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread: Thread is done:
> Number of Users 1-1
> 2015/11/09 17:24:44 INFO - jmeter.threads.JMeterThread: Thread finished:
> Number of Users 1-1
> 2015/11/09 17:24:44 INFO - jmeter.engine.StandardJMeterEngine: Notifying
> test listeners of end of test
> 2015/11/09 17:24:44 INFO - jmeter.services.FileServer: Close:
> c:\Users\anish.philip\Desktop\Jmeter projects\test data.txt
> 2015/11/09 17:24:44 INFO - jmeter.gui.util.JMeterMenuBar:
> setRunning(false,*local*)
>
> What am I doing wrong?
>
>
>
>
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/While-controller-with-CSV-Data-Set-Config-tp5723429.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Re: While controller with CSV Data Set Config
Posted by waseemfa <fa...@gmail.com>.
Make the following changes.
In Thread Group -> set Loop Count: Forever
In CSV Data Set Config
Recycle on EOF : False
Stop thread on EOF : True
-Waseem
--
View this message in context: http://jmeter.512774.n5.nabble.com/While-controller-with-CSV-Data-Set-Config-tp5723429p5723431.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Re: While controller with CSV Data Set Config
Posted by anishjp <an...@gmail.com>.
Hi guys
Thanks for all the replies. When I added "Debug Sampler", I can see that,
each value for terminalid is being picked up. In the "View Results Tree", I
see only one "HTTP sampler request" instance and rest are "Debug sampler"
instances. There are 20 records in the CSV data set config. Shouldn't I see
20 "HTTP sampler request" instances? The "HTTP sampler request" instance
picked up the last number. Check the attached screenshots.
<http://jmeter.512774.n5.nabble.com/file/n5723436/View_results_tree.png>
<http://jmeter.512774.n5.nabble.com/file/n5723436/View_results_in_Table.png>
<http://jmeter.512774.n5.nabble.com/file/n5723436/Hits_per_second.png>
Regards,
Anish
--
View this message in context: http://jmeter.512774.n5.nabble.com/While-controller-with-CSV-Data-Set-Config-tp5723429p5723436.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org