I'm recording a web test using Visual Studio 2010.
For each request, the expected response url is recorded, and a validation rule on the test ensure that these response are correct.
The test is using random data. For a particular request, in certain case the response url may differ from what is recorded, and the test is still valid. I can handle an action depending on the response url in a WebTestRequestPlugin, but the validation rule still applies.
I tried removing the response url in the properties tab for that request, but if the field is empty, the validation rule seems to expect the same url as the request for the response.
Is there a way to disable that validation rule for that single request?
[Edit] I just think that being able to put wildcards in the ExpectedResponseUrl field for the request would be great... but that does not seems to work with a "*". [/Edit]
Try converting the test to a coded test. Then you can either write a small piece of code so the expected url will be correct, or override the validator.
You could create a custom Validation rule if you want to avoid coding the test.
You can effectively remove the Response URL validator on a single request as follows:
Just simply remove the Response URL rule which is added by default under validation rules. This will pass your tests and if you need to test the URLs, you can always add custom validation rules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With