Forum Discussion

torus's avatar
torus
Contributor
9 months ago

Web Testing - How to extract Network Responses and http status codes with TC

When conducting a UI web test (UI test of an online application), is there a way to monitor the network reposes (the returned http status codes) and ensure no 400/500 error codes (or other error codes) appeared while running the test? There are a few tests where I got a few error messages during the execution of one of my UI tests ... one of the response messages was an error message, however, the TC test still passed. The test really shoudl not have passed since there was an error message. 

 

Similar to how you can monitor network reposes in selenium:

https://www.youtube.com/watch?v=h-1bon3dMac

 

 

 

5 Replies

    • torus's avatar
      torus
      Contributor

      I wasn't quite looking for error handling when errors occurred in the test. While I am running a UI test, I would like for testComplete to monitor the Network area of the browser (in the developer tools of chrome). If a failure status shows up (such as a 400 or 500 series http response code), then TestComplete would push that onto a stack or write it to the log as a 'Warning' message. Even though you get a 400 or 500 response in the network tab, this doesn't mean the test is going to fail. So, a test could pass, but there were some glitches with the website that the TestComplete test wouldn't catch if it weren't monitoring the network traffic (the http response codes).