tsung icon indicating copy to clipboard operation
tsung copied to clipboard

dyn_variable with dynamic jsonpath, xpath and regular expressions

Open tisba opened this issue 7 years ago • 0 comments

Let's say you have a file server filling %%_foo%% with 42. Currently you cannot use this to build a dyn_variable with jsonpath that contains a dynamic element (same with xpath and other types).

e.g. this does not work:

<request subst="true">
  <dyn_variable name="product" jsonpath="positions[sku==%%_foo%%].quantity"/>
  <!-- ... -->
</request>

I'd like to be able to use dynamic jsonpath and xpath expressions. At least everything that does not need to be compiled beforehand should be possible to support substitutions:

  • [x] jsonpath: https://github.com/processone/tsung/pull/317
  • [ ] xpath
  • [ ] re

tisba avatar Jul 18 '18 13:07 tisba