Unanswered question

I need to break down a variable and send single characters at a time for a live-style search field

I have a field that searches for matches as the user types. the recording will send requests similar to;
"a"
"ab"
"abc"
Until the user selects a suggested matched value. the effect is multiple searches per user and this should be replicated. Unsure how best to acheive this since each search term will be different and therefore variable in content and length.

Nick L.
Nick L.

Nick L.

Level
0
1 / 100
point

Answers

Vishnu A.
Vishnu A.

Vishnu A.

Level
0
73 / 100
points

Looks like the requests itself are dynamically generated based on the number of characters given by the user.
My opinion would be create scripts for every different search key length(the most common ones) and then parameterize each of the key (each character in requests for search) with NeoLoad variables and use your lists of defined most common search keys as csv or list to fit into these variables by each character, so that the ultimate key formed out of these variables should be a key the user wants to select. Then combine these Vusers to form a common Population.

Hope this helps!

christophe M.
christophe M.

christophe M.

Level
4
5000 / 5000
points
Team

Hi,

An alternative would be to use a Javascript to dynamically create the different variables before the search:
search_1="a"
search_2="ab"
search_3="abc"
search_length=3
and use a loop:
Loop named "myLoop", that loops "search_length" times:

  • inject "${search_${myLoop_counter}}" as the search criteria.