Forum Discussion
Hi richie ,
Scripts definetely help. However, it is a good practice to keep the tests simple and use in built functionality instead. This would make the whole thing easier to maintain and easier to understand for a new tester for instance.
In your particular case, why would you use code and not an in-built regex assertion?
- richie6 years agoCommunity Hero
Hey man I'll take anything - I'd been up all night working when I posted this - regex didn't even enter my head! ;)
However - its on a repeating attribute - there's maybe 20,000 records of data - yes I can use a contains assertion using regex but how would I use the embedded functionality to assert a repeating 'whatever' attribute is upper case for 20,000 records?
I don't see how you can..... unless you have some whizzy ideas?
nice one!
richie
- Lucian6 years agoCommunity Hero
Well it's not about the Contains assertion. It is about the JsonPath RegEx Match assertion which is created just for that. If you can provide me a sample response I might be able to help you out.
Lucian.
Related Content
- 5 years ago