Monday 20 April 2015

Extract and co-relate last occurrence in Jmeter

To extract last occurrence for co-relating a value without using bean-shell/BSF/JSR223 components use following steps

1. Extract all occurrences using Regular Expression Extractor














     Use "-1" in Match No. to extract all concurrences
     ${cCellId2_matchNr} - contains count of values extracted

2. Consider that cCellId2 contains 5 values, now we need the value of  ${cCellId2_5}, but we cannot get that value by directly substituting  ${cCellId2_matchNr} in place of "5" instead we need to use "${__V()}" function

     a) ${cCellID2_${cCellId2_matchNr}} - wrong

     b) ${__V(cCellId2_${cCellId2_matchNr})} - correct