Forum Discussion

mmoser18's avatar
mmoser18
Frequent Contributor
10 years ago
Solved

Operations on Custom properties before replacement

I am doing response assertions using regular expressions. The responses contain certain fragments that echo values from the  requests arguments, i.e. if the request is e.g.: http://some.url/some/pat...
  • rupert_anderson's avatar
    rupert_anderson
    10 years ago

    Hi,

     

    Thanks for the edit to your question, but I think my answer is still just as relavent? Alhough the first option I suggested is probably overkill, how about just doing a Script Assertion as per my second suggestion?

    Or perhaps I am missing something, but say you have TestSteps like:

     

    1. Goovy TestStep with

    context["argument"]="abcdef" //set initial value of your parameter

    2. REST Request TestStep

     

    In your Contains Assertion you can use ${=argument.toUpperCase()} to look for ABCDEF?

     

    Also in your Contains Assertion, its less exact, but you could even tick 'ignore case' e.g.

     

    Screen Shot 2016-03-11 at 09.28.06.png 

     

    Is this on the right track for what you want?

     

    Cheers,

    Rupert