On 25/06/2009, Stromas, Aaron (NIH/OD) [C] <[email protected]> wrote: > Greetings! > > I have a test plan that uses a RE Extractor to convert the values of the > HTML select element to the input values of the ForEach controller. These > values are of the form X,M,N~Y,A,B~...~Z,C,D, and I can see from the log that > they are properly generated. The reference name for these values is tuple. > The ForEach controller Input variable prefix is tuple, and the Output > variable name is threetuple. > > I am emulating Javascript which breaks up the value of selected option and > submits an HTTP request with the values of each of thre-tuple as parameter. > To that end, I have another ForEach controller as a child of the first one > with the BeanShell preprocessor: > > String[] tuples = vars.get("threetuple_1").split("~"); > > List list = new ArrayList(); > > for (int i = 0; i < tuples.length; i++) { > list.add(tuples[i].split(",")); > } > > vars.put("params", list); > > The inner ForEach controller has a HTTP Request sampler with a BeanShell > preprocessor whose job is to break up the three-tuple into individual > parameters. > > In short, no HTTP sampler ever executes, and the log shows that the inner > ForEach controller receives null input. > > I can see in the log, what I presume to be invocation of the outer ForEach: > > ... jmeter.control.ForEach resultstring isDone=SAR,713,0~RCC,988,343... > > > and the inner ForEach: > > ... jmeter.control.ForeachController: No entries found - null first entry: > params_1 > > The questions are: is there any way of knowing why the BeanShell > preprocessor did not execute? > > Once that problem resolved, I need to tackle the business of the ForEach > output variable which gets loop index appended to it, so how can the > BeanShell "know" which variable to use? > > Any suggestions?
The ForEach Controller needs multiple variables, not a list: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#ForEach_Controller > Thank you! > > > -a > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

