Return-Path: X-Original-To: apmail-jmeter-user-archive@www.apache.org Delivered-To: apmail-jmeter-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B26729E74 for ; Thu, 16 Aug 2012 08:33:38 +0000 (UTC) Received: (qmail 75249 invoked by uid 500); 16 Aug 2012 08:33:38 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 73614 invoked by uid 500); 16 Aug 2012 08:33:32 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 73581 invoked by uid 99); 16 Aug 2012 08:33:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2012 08:33:30 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FSL_RCVD_USER,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FRT_BELOW2,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xor007@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-ob0-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2012 08:33:23 +0000 Received: by obqv19 with SMTP id v19so3494566obq.2 for ; Thu, 16 Aug 2012 01:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/VnkrdOTHr4WxaBw0l9uj8E3Hdysd/TiQf0fICqz0so=; b=FQK5jTIlqw5LZ62Y52Dv1NaXadVr27osyqPUMSTUNiJnuwXVVEEz8pWhlNPAhDw2jN c3i4aBgyzsUIBiX/OQG29KDeBJPuVBFf8o5VTcCb28lm8QuPAPwZSC4x4TA/5aA9M1zz 4ScG8DvxKCBV1KEvjvJnHqlk2gBekLRlVpFctwvdcBbFp8QCjeEUlTCF8Ddo/0gy2YJb hIJqSWVTy9zZpktKLU8x7lSFBGPbaK7NzhcmVjuh+njnpeyAebIbswuVmli7TCTwoUF8 pMZhB5eaI7qSIxJhnC2pk5HNsf95550f0WqKzDC0Ab5C6g0VziKg2YkChmOZNtXTpxTc Nbbw== MIME-Version: 1.0 Received: by 10.60.7.133 with SMTP id j5mr346347oea.8.1345105982231; Thu, 16 Aug 2012 01:33:02 -0700 (PDT) Received: by 10.60.125.229 with HTTP; Thu, 16 Aug 2012 01:33:02 -0700 (PDT) In-Reply-To: References: Date: Thu, 16 Aug 2012 10:33:02 +0200 Message-ID: Subject: Re: Is it possible to restrict the CSV Data config element to a specific Sampler or even Logic Controller? From: Jean FX To: JMeter Users List Content-Type: multipart/alternative; boundary=e89a8ff252b041948b04c75de4d7 --e89a8ff252b041948b04c75de4d7 Content-Type: text/plain; charset=ISO-8859-1 Hello Deepak. The original plan is not exactly what I uploaded because of it contained real information, so it is not have step 1. I have done a better mock test plan with all the steps here: http://pastebin.com/g7J4KiHF. I have given further clarifications inline. On Wed, Aug 15, 2012 at 8:27 PM, Deepak Shetty wrote: > Hi > i dont see your test case reflecting your original requirement > > >1- Send a constant XML-RPC request to a server and grab a value from the > >result(doing this with Xpath Extractor). > >2- Then send a variable number of XML-RPC requests with values coming from > >a csv file(Trying to use a CSV Data config for this) > >3- Finally, send another last XML-RPC request only once. > > How is step 2 being determined? A variable is set in step 1 that is used for every line in step 2. > Is only the number varying? In this mock test yes there is only one variable used but in real test there are multiple values per csv line. > If you have > multiple threads do they read the same data , different data ? This test is functional and will use a single thread. It might be necessary to run a multi thread stress test at a later stage but I could potentially use different instances for this. > Do you have > to read specific rows? > No. For step 2, rows are equal and independent and could potentially run in a different order. > > regards > deepak > > > > > > On Wed, Aug 15, 2012 at 9:21 AM, Jean FX wrote: > > > Thanks a lot for your reply! > > > > Will try to understand the functions to see if I can implement with > > functions. I want to avoid implementing a custom Sampler if possible. > > > > I have tried making the CSV Data sampler a child of a while logic > > controller together with the Sampler to be repeated but it still tries to > > use the data to repeat the Sampler that follows the While controller in > the > > testplan, which should only run once. > > > > I have pasted my Test Plan here : http://pastebin.com/0P7bCVTP > > > > Kind Regards, > > Jean > > > > On Wed, Aug 15, 2012 at 5:52 PM, Deepak Shetty > wrote: > > > > > Hi > > > I dont remember the scoping rules now (but I believe the CSV config > had > > to > > > be a child of a while controller or equivalent to do what you want - > but > > my > > > memory has always been poor :) ) > > > > > > In any case it looks like the csvread or stringfromfile functions would > > > work for you > > > http://jmeter.apache.org/usermanual/functions.html > > > > > > P.S. if you attached your test script it didnt come to the mailing > list - > > > you should upload the script and provide a link to it. > > > regards > > > deepak > > > > > > On Wed, Aug 15, 2012 at 12:03 AM, Jean FX wrote: > > > > > > > Hello Shaba. > > > > > > > > I had tried putting the CSV Data config element in both a Logic > > > Controller > > > > and a Sampler. In both case jMeter did not respect this. It repeated > > > > execution for every line in the csv file even beyond the Logic > > > > Controller(see my test plan bellow). > > > > > > > > Your site does not address this topic. > > > > > > > > On Tue, Aug 14, 2012 at 3:17 PM, Shaba K > wrote: > > > > > > > > > Yes we can include CSV data config as a child to that sampler. > > > > > > > > > > Here's a little write up about JMeter hope it helps. > > > > > > > > > > > > http://automationwithselenium.blogspot.co.uk/2012/01/jmeter-proxy.html > > > > > > > > > > cheers, > > > > > s > > > > > > > > > > On Tue, Aug 14, 2012 at 12:50 PM, Jean FX > wrote: > > > > > > > > > > > Hello, > > > > > > > > > > > > I am a really new user of jMeter. Trying to implement a set of > > > > functional > > > > > > tests in one single test plan. > > > > > > > > > > > > In this plan, I need to : > > > > > > > > > > > > 1- Send a constant XML-RPC request to a server and grab a value > > from > > > > the > > > > > > result(doing this with Xpath Extractor). > > > > > > 2- Then send a variable number of XML-RPC requests with values > > coming > > > > > from > > > > > > a csv file(Trying to use a CSV Data config for this) > > > > > > 3- Finally, send another last XML-RPC request only once. > > > > > > > > > > > > It all works as expected (almost) but the last XML-RPC request is > > > > > repeated > > > > > > for every line in the CSV Data config file. > > > > > > > > > > > > Is it possible to restrict the CSV Data config element to a > > specific > > > > > > Sampler or even Logic Controller? > > > > > > > > > > > > Thanks in advance, > > > > > > Jean > > > > > > > > > > > > Bellow My current test plan: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > testname="ATPZero" enabled="true"> > > > > > > > > > > > > true > > > > > > > > name="TestPlan.serialize_threadgroups">false > > > > > > > > > > > elementType="Arguments" guiclass="ArgumentsPanel" > > > testclass="Arguments" > > > > > > testname="User Defined Variables" enabled="true"> > > > > > > > > > > > > > > > > > > MSISDN > > > > > > name="Argument.value">66349528 > > > > > > = > > > > > > > > > > > > > > > > > > volDA > > > > > > 17 > > > > > > = > > > > > > > > > > > > > > > > > > countDA > > > > > > 29 > > > > > > = > > > > > > > > > > > > > > > > > > bonusDA > > > > > > 42 > > > > > > = > > > > > > > > > > > > > > > > > > MSISDN1 > > > > > > name="Argument.value">66349528 > > > > > > = > > > > > > > > > > > > > > > > > > > > > > > > > name="TestPlan.user_define_classpath"> > > > > > > > > > > > > > > > > > > > testclass="ThreadGroup" > > > > > > testname="AutoTester" enabled="true"> > > > > > > > > > > > elementType="LoopController" guiclass="LoopControlPanel" > > > > > > testclass="LoopController" testname="Loop Controller" > > enabled="true"> > > > > > > > > > > name="LoopController.continue_forever">false > > > > > > 20 > > > > > > > > > > > > 1 > > > > > > 1 > > > > > > > > > name="ThreadGroup.start_time">1344265518000 > > > > > > > > name="ThreadGroup.end_time">1344265518000 > > > > > > false > > > > > > > > > > > name="ThreadGroup.on_sample_error">continue > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > testclass="HeaderManager" > > > > > > testname="HeaderTestLab" enabled="true"> > > > > > > > > > > > > > > > > > > > name="Header.name">User-Agent > > > > > > UGw > > > > > > Server/4.1/1.0 > > > > > > > > > > > > > > > > > > > > name="Header.name">Content-Type > > > > > > name="Header.value">text/xml > > > > > > > > > > > > > > > > > > > > name="Header.name">Authorization > > > > > > Basic > > > > > > 2hda-=asfafaad1 > > > > > > > > > > > > > > > > > > default ucip > headers > > > for > > > > > > pssim > > > > > > > > > > > > > > > > > > > > > > > testclass="GenericController" testname="BatchRequests" > > > enabled="true"/> > > > > > > > > > > > > > > > testclass="SoapSampler" > > > > > > testname="PingUser" enabled="true"> > > > > > > > > > > > elementType="Arguments"> > > > > > > > > > > > > > > > > > > > > > > > > http://192.168.101.120:10010/Air > > > > > > <?xml > > > > > > version="1.0" encoding="UTF-8"?> > > > > > > <methodCall> > > > > > > <methodName>GetBalanceAndDate</methodName> > > > > > > <params> > > > > > > <param> > > > > > > <value> > > > > > > <struct> > > > > > > <member> > > > > > > <name>originNodeType</name> > > > > > > <value> > > > > > > <string>EXT</string> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>originHostName</name> > > > > > > <value> > > > > > > <string>USSDGW</string> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>originTransactionID</name> > > > > > > <value> > > > > > > <string>2012080619175629676</string> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>originTimeStamp</name> > > > > > > <value> > > > > > > > > > > > > > > > <dateTime.iso8601>20120806T19:17:56+0500</dateTime.iso8601> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>subscriberNumberNAI</name> > > > > > > <value> > > > > > > <i4>1</i4> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>subscriberNumber</name> > > > > > > <value> > > > > > > <string>${msisdn}</string> > > > > > > </value> > > > > > > </member> > > > > > > </struct> > > > > > > </value> > > > > > > </param> > > > > > > </params> > > > > > > </methodCall> > > > > > > > > > > > > > > name="SoapSampler.xml_data_file"> > > > > > > > name="SoapSampler.SOAP_ACTION"> > > > > > > > > > > > name="SoapSampler.SEND_SOAP_ACTION">false > > > > > > > > name="HTTPSampler.use_keepalive">false > > > > > > > > > > > > > > > > > > > > > > > testclass="XPathAssertion" testname="responseOK" enabled="true"> > > > > > > false > > > > > > > > > > > name="XPath.xpath">//member[name="responseCode" and > > > > > > value/*=0] > > > > > > false > > > > > > false > > > > > > false > > > > > > false > > > > > > > > > > > > > > > > > > > > > > > testclass="XPathExtractor" testname="GetResponseCode" > > enabled="true"> > > > > > > contains the > > > > response > > > > > > code > > > > > > > > > name="XPathExtractor.default">100 > > > > > > > > > > name="XPathExtractor.refname">rCode > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > name="XPathExtractor.xpathQuery">//member[name="responseCode"]/value/*[1] > > > > > > > > name="XPathExtractor.tolerant">false > > > > > > > > name="XPathExtractor.namespace">true > > > > > > > > name="XPathExtractor.validate">false > > > > > > > > > > > > > > > > > > > > > > > > testclass="CSVDataSet" > > > > > > testname="ListOfUsers" enabled="true"> > > > > > > > > > > > name="filename">/home/jean/Integration/testmses.csv > > > > > > > > > > > > > > > > > > > > name="variableNames">msisdn,volDa,volVal,countDa,countVal > > > > > > , > > > > > > false > > > > > > true > > > > > > false > > > > > > All threads > > > > > > > > > > > > > > > > > > > > > > > > > > testclass="SoapSampler" > > > > > > testname="GetAccountDetails" enabled="true"> > > > > > > > > > > > elementType="Arguments"> > > > > > > > > > > > > > > > > > > > > > > > > http://192.168.101.120:10010/Air > > > > > > <?xml > > > > > > version="1.0" encoding="UTF-8"?> > > > > > > <methodCall> > > > > > > <methodName>GetAccountDetails</methodName> > > > > > > <params> > > > > > > <param> > > > > > > <value> > > > > > > <struct> > > > > > > <member> > > > > > > <name>originNodeType</name> > > > > > > <value> > > > > > > <string>${originNodeType}</string> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>originHostName</name> > > > > > > <value> > > > > > > <string>${originHostName}</string> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>originTransactionID</name> > > > > > > <value> > > > > > > <string>${transaction_id}</string> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>originTimeStamp</name> > > > > > > <value> > > > > > > > > > > > <dateTime.iso8601>${timestamp}</dateTime.iso8601> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>subscriberNumberNAI</name> > > > > > > <value> > > > > > > <i4>${subscriberNumberNAI}</i4> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>subscriberNumber</name> > > > > > > <value> > > > > > > <string>${subscriberNumber}</string> > > > > > > </value> > > > > > > </member> > > > > > > <member> > > > > > > <name>requestedInformationFlags</name> > > > > > > <value> > > > > > > <struct> > > > > > > <member> > > > > > > > > > > > <name>requestMasterAccountBalanceFlag</name> > > > > > > <value> > > > > > > <boolean>1</boolean> > > > > > > </value> > > > > > > </member> > > > > > > </struct> > > > > > > </value> > > > > > > </member> > > > > > > </struct> > > > > > > </value> > > > > > > </param> > > > > > > </params> > > > > > > </methodCall> > > > > > > > name="SoapSampler.xml_data_file"> > > > > > > name="SoapSampler.SOAP_ACTION"> > > > > > > > > > > > name="SoapSampler.SEND_SOAP_ACTION">false > > > > > > > name="HTTPSampler.use_keepalive">false > > > > > > > > > > > > > > > > > > > > > > > testclass="XPathAssertion" testname="responseOK" enabled="true"> > > > > > > false > > > > > > > > > > > name="XPath.xpath">//member[name="responseCode" and > > > > > > value/*=0] > > > > > > false > > > > > > false > > > > > > false > > > > > > false > > > > > > > > > > > > > > > > > > > > > > > testclass="XPathExtractor" testname="GetResponseCode" > > enabled="true"> > > > > > > contains the > > > response > > > > > > code > > > > > > > > name="XPathExtractor.default">100 > > > > > > > > > name="XPathExtractor.refname">rCode2 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > name="XPathExtractor.xpathQuery">//member[name="responseCode"]/value/*[1] > > > > > > > name="XPathExtractor.tolerant">false > > > > > > > name="XPathExtractor.namespace">true > > > > > > > name="XPathExtractor.validate">false > > > > > > > > > > > > > > > > > > > > > > > > > > > > > testclass="ResultCollector" testname="View Results Tree" > > > > enabled="true"> > > > > > > > > > name="ResultCollector.error_logging">false > > > > > > > > > > > > saveConfig > > > > > > > > > > > > > > > > > > true > > > > > > true > > > > > > true > > > > > > > > > > > > true > > > > > > true > > > > > > true > > > > > > true > > > > > > false > > > > > > true > > > > > > true > > > > > > false > > > > > > false > > > > > > true > > > > > > false > > > > > > false > > > > > > false > > > > > > false > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > false > > > > > > > 0 > > > > > > true > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --e89a8ff252b041948b04c75de4d7--