Problem
However, I don’t know what errors could manifest without actually watching the screen while it runs. So I have just added Thread.Sleep(50); at the end instead of asserting any elements (as I said I don’t know how the form would react).
Question
I’m wondering if there is a better way other than watching the screen. Are there common things I can check? (maybe automate checking for text ‘Error’ or some HTTP response?)
You should run the BLNS against the API. It will be so much faster and you’ll check the same validations (if an error is returned or not) Here you can check the HTTP response + error returned. Using a tool/framework like SoapUI, Postman, …
If you wish to test this in the UI, you should not fill in the complete BLNS. It will take way to long. You can just enter a “wrong keyword” and validate if an error is returned in the UI.
That was so obvious and yet I missed it! Yes you’re right, I should be testing for the specific error pages and not just spam the field unnecessarily. Not sure how it works with automating BLNS with API tests but I do have Postman installed so it’s worth me exploring that.
Hoeray, happy to help =D
Sometimes we just overthink stuff and don’t see what’s in front of us!
If you need some help with Postman, don’t be afraid to ask!
Easiest is probably to have the request in a collection. The value of your field should be a variable coming from the blns.json file. Be careful though, maybe not all input of the blns file is actually “bad input”. You might need to eliminate some data first.