Is there any assertion for creating substrings with variable length of a given context variable in the api gateway?
--> substring(beginIndex, endIndex)
My guess was doing this with regex with the following pattern:
This matches only the first 100 characters and it works, but we need the character amount to be set dinamically:
Here we could set the context variable maxLength to 100 or whatever.
But this never matches to any given string because the regular expression assertion treats the input from the context variable maxLength as literals e.g.
Found it out by myself. I can use the xpath function substring($string, $start, $end)
Could you please help me with which assertion we have to use to configure substring(......)
I created an encapsulated assertion with the assertion "Response must match Xpath" like this: