RequestFilter.filterRequest Script not triggered during test run
I'm trying to use a RequestFilter.filterRequest event handler to update my json test request when it contains a "null" value (inside double quotes) and replace it with null (without quotes). The reason the double quote gets added to my request payload is because i'm sending null as a value from my datasource step. The datasource step has multiple rows of data to handle all possible flavors of data (null, blank, maxlength, minlength etc) for the given field.
This is how my json request looks if i send null from my datasource step. I need to remove the wrapped quotes around null. "key": "null",
I'd like to replace the above as follows. "key": null,
If youre struggling to get the event handler to sort it (even though from what youve described id expect it to successfully convert the text null into wellformed null datatype), you could import into a Properties step and change the datatype that way?
I appreciate this is far less efficient than using events as youd need to do this for each testcase that has a wellformed null in there, but it would work.
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta