0

Based on this thread Jmeter - Use Loop controller based on array (created from from multiple variables) I managed to use Loop controller based on the array.

Now I need to pass the each value from the array into JDBC, so I can perform select statement based on every single member of the array. What I try is:

enter image description here

But I got error as:

enter image description here

When I try the same statement with Dammy sampler is working fine.

How to pass member from the array into JDBC inside the loop controller?

vlatko606
  • 909
  • 1
  • 13
  • 21

1 Answers1

0

JMeter log file explicitly states Cannot invoke method length() on null object

enter image description here

The only place where you're invoking length() function is vars.get('array').length() which means that your ${array} variable is null (not defined), you can double check it using Debug Sampler and View Results Tree listener combination.

If the same statement works elsewhere - the only explanation I can think of is variable scope, see JMeter Scoping Rules user manual chapter for more details.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133