Answered question

Count of values inside a variable

Is there a way I can find the number of values present in a particular variable of type list or file.

I would like to run a loop to get the complete list of all parameters into a single string (using string concatenation inside Javascript) and pass it into a SQL query. The number of values inside the variable could vary from test case to test case. Is there any function / feature within Neoload which could give me the number / count of values?

There's not built-in function that could provide you such information. There's a Javascript function that can provide the number of items of a shared queue. So if your values can be put inside a shared queue in advance then you can use the "getSharedQueueSize" function to get the number of items.

Now you could still use a List or File variable and configure it to return "<NO VALUE>" when it runs out of values. I guess you could stop your loop when the value returned is <NO VALUE>.


Did you find this useful ?

No (0)

Yes (0)

0% of users found this answer useful