Forum Discussion

ashutosh's avatar
ashutosh
Occasional Contributor
5 years ago
Solved

JSONPath Match Assertion - Make comparison Case Insensitive

Hi ,   I am trying to  Perform a JSONPath Match .  RegionID in Request is in UpperCase (this data is pulled from another SQL data source test step which represents the values in upper case) A...
  • Radford's avatar
    5 years ago

    I fully understand the desire to use the inbuilt functionality of ReadyAPI over Groovy scripting. JSONPath seems quite limited in the functions it implements, so I think you are limited to manipulating the "Expected Result". One way I think you can do his is to take advantage of the fact that in a Property Expansion you can actually execute Groovy Script, thus you can specify your expected result as:

     

    ${=context.expand('${Get RegionID from SQL#RegionID}').toUpperCase()}

    While I know you stated you didn't want to use Groovy, but perhaps this is a simpler alternative to a Script Assertion.

     

    Perhaps someone else might be able to provide a better solution?