Forum Discussion
So the form name can be 1 or more form names that I'm comparing. So lets change the scenario and say I have 3 different form name property/variables: name1, name2 and name3. Also lets say my form's count (counting up all the xpath form/names) is 50 (as an example).
I'm totaling up count(name1) + count(name2) + count(name3) to make sure all the form/name combinations are accounted for. So checking if it's equal to the overall xpath form/names count confirms this. I couldn't think of a better way to make sure all my tags have a value and a correct value.
I was trying to keep my example simple, but the assertion can get a little more complex. I'm wondering if the better fix would be to split the 2 checks into 2 separate assertions? Put the if count>0 in one assertion and then verify all the other sums of form name counts in another assertion. I just feel the latter will still have somewhat of an issue.
It's just odd the running of the test case or the testing inside the assertion runs quick. But when I save out of editing it takes so long.
Thanks!
The groovy script I provided can be easily adapted to check against multiple expected form names. To address your latest concern, I have noticed the same behavior. Whenever you edit/change a groovy script assertion and close the window, it reprocesses that assertion and re-runs it against the response. There's no real way around that unfortunately. I am not sure why it would take so much longer.
Related Content
- 2 years agojerry91
- 9 months agoKimdoengart
- 6 years agorizzomeister