0

Is there an easy way to test some web page looking for some errors. I mean usually while doing web testing we want to check the display which could be very difficult to maintain. So I wanted to know if as an alternative strategy there are some practice to massively test the URLs of a website and just look for any kind of error including JS error in the console. I think it is possible using a framework like Selenium but it might be a bit overkill no ? Also the idea will be to do that on a production server, in addition to test server.

The website have some authentication so just hitting the URLs will not work.

bloub
  • 510
  • 1
  • 4
  • 21
  • It'll depend on how the site returns errors. Some won't return the standard error codes. Best to just keep a log server-side. For client-side console errors you might be able to use Selenium. I found some older 3.x solutions here using getLogs (which I think is still marked as beta): https://stackoverflow.com/questions/4189312/capturing-javascript-error-in-selenium I think Selenium 4 should have more support for this in BiDi API: https://www.selenium.dev/documentation/webdriver/bidi_apis/ – pcalkins Nov 10 '21 at 17:21
  • Btw, if the site does return standard 404s, there's a tool I used to use a lot called Xenu's Link Sleuth. It'll just crawl the whole site and report any 404s found. (It's pretty old now, so I bet there's some better tools like that out there...) – pcalkins Nov 10 '21 at 17:42
  • Google Analytics is also a good option it'll keep a log of all errors. – pcalkins Nov 10 '21 at 17:48

0 Answers0