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 27BCCD7A7 for ; Tue, 21 Aug 2012 07:58:27 +0000 (UTC) Received: (qmail 28214 invoked by uid 500); 21 Aug 2012 07:58:26 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 27816 invoked by uid 500); 21 Aug 2012 07:58:21 -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 27787 invoked by uid 99); 21 Aug 2012 07:58:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2012 07:58:21 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,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; Tue, 21 Aug 2012 07:58:13 +0000 Received: by obqv19 with SMTP id v19so11470371obq.2 for ; Tue, 21 Aug 2012 00:57:52 -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=3r0SlBaKWpgHip9t25fEtw+L4Idz7CqrmXZ9LzrTdxk=; b=vwR+Tcfz9pBjlj6dpIyBCADv1ixAyxHlqFg4AM134wYGZ8G1WJsHtJyH2/zzXnMdle HBPEs5fgpk0iC4eIHDzLTdSAv5GCYyG5ZS8NhmIjDsqL57LosEITWRQbUGsXQT908seS n7DbdJ86KCAdySw3m1doXRXwHtQd10DJC1CdWd5iC53x7v8zdikCbsywqP0s0mxE54YZ EQz7t/B3dtMH0mL/oByFqVkklLGqzDCTG0W4ZFVePT6lBPZEGkRXjDRzVzDWvr/GOc4f UKi2d8dA0I8qU1glKq2MscAbK6ft4TmSphz/GLPcJDBTz5Cq2eZO41h8pXLoDeADCYvD 4IsQ== MIME-Version: 1.0 Received: by 10.60.29.164 with SMTP id l4mr12749584oeh.4.1345535872171; Tue, 21 Aug 2012 00:57:52 -0700 (PDT) Received: by 10.60.125.229 with HTTP; Tue, 21 Aug 2012 00:57:52 -0700 (PDT) In-Reply-To: References: Date: Tue, 21 Aug 2012 09:57:52 +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=e89a8fb1f3cab17fed04c7c1fb5d --e89a8fb1f3cab17fed04c7c1fb5d Content-Type: text/plain; charset=ISO-8859-1 Hello. Yes the idea is to process every row in the CSV. I am only using a while loop because it is necessary (I believe) to restrict the CSV Data config element to the XML-RPC Sampler in step2. On Fri, Aug 17, 2012 at 6:03 PM, Deepak Shetty wrote: > hi > Im still having trouble understanding what your issue is > a. Step1 is fine and you are retrieving a value called rCode. > b. Step 2 has a while controller which has no condition -- what is the > condition for your loop? Process every row in the CSV? Yes > execute it for rCode > iterations? No. This is a proof of concept. In real implementation I am retrieving the value of a different element . > The sampler under the while loop is also extracting out rCode - > is that correct? Yes but I could remove this: I only need to assert that it is 0 in every response. > where is this rCode being used? > It is a proof of concept. In real test I would need to use the extracted value in a subsequent XML-RPC Sampler within the same loop. But in order to simply the problem I removed that step. > c. Step 3 is fine > > regards > deepak > > > On Thu, Aug 16, 2012 at 1:33 AM, Jean FX wrote: > > > 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"> > > > > > > > > > > > > > > > > name="TestPlan.functional_mode">true > > > > > > > > > > > > name="TestPlan.serialize_threadgroups">false > > > > > > > > > > > > > > > elementType="Arguments" guiclass="ArgumentsPanel" > > > > > testclass="Arguments" > > > > > > > > testname="User Defined Variables" enabled="true"> > > > > > > > > > > > > > > > > > > > > > > > > > name="Argument.name">MSISDN > > > > > > > > > > name="Argument.value">66349528 > > > > > > > > name="Argument.metadata">= > > > > > > > > > > > > > > > > > > > > > > > > name="Argument.name">volDA > > > > > > > > 17 > > > > > > > > name="Argument.metadata">= > > > > > > > > > > > > > > > > > > > > > > > > > name="Argument.name">countDA > > > > > > > > 29 > > > > > > > > name="Argument.metadata">= > > > > > > > > > > > > > > > > > > > > > > > > > name="Argument.name">bonusDA > > > > > > > > 42 > > > > > > > > name="Argument.metadata">= > > > > > > > > > > > > > > > > > > > > > > > > > name="Argument.name">MSISDN1 > > > > > > > > > > name="Argument.value">66349528 > > > > > > > > name="Argument.metadata">= > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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 > > > > > > > > > name="LoopController.loops">20 > > > > > > > > > > > > > > > > > name="ThreadGroup.num_threads">1 > > > > > > > > name="ThreadGroup.ramp_time">1 > > > > > > > > > > > > > name="ThreadGroup.start_time">1344265518000 > > > > > > > > > > > > name="ThreadGroup.end_time">1344265518000 > > > > > > > > name="ThreadGroup.scheduler">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] > > > > > > > > name="XPath.validate">false > > > > > > > > > name="XPath.whitespace">false > > > > > > > > name="XPath.tolerant">false > > > > > > > > name="XPath.namespace">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 > > > > > > > > name="XPath.whitespace">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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --e89a8fb1f3cab17fed04c7c1fb5d--