I have an extenal test data file (excel/csv).
My requirement is In my jmx tree my first http request should take the value from ContentName column, ex: www.sample.${ContentName} and to that i need to apply JsonPathExtractorApi column as jp@gc - JSON Path extractor.
Please not that i need to have only one json path extractor which takes ${JsonPathExtractorApi}. where for Hotel i need to extract 4 times where as for ship 2 times, for Gem 3 times as the number of JsonPathExtractorApi against that.
Below i have attached the sample which im trying to implement.
Problems : 1.How can find the total number of JsonPathExtractorApi against each ContentName.
2.If i keep my CSV outside the loop controller i cant traverse through csv ,every time i get first value(ContentName).
3.If i keep csv inside loop,i can traverse through csv but cant take the contentvalue before it(for the first http sampler where i have to take response data)
Please can anyone take time and suggest on this.Any other approach is also acceptable if it serve the purpose.
Thanks in advance.
If you don't have any control of this "external data file" the only solution would be going for 2 If Controller instances
Example Test Plan outline:
${__groovy(!vars.get('ContentName').equals(''),)}
${__groovy(vars.get('ContentName').equals(''),)}
Demo: