2

I have local application and I would like to check not only a specific URL, but also all dependent assets requests (css, js, etc). Is there an easy way to do it?
I had a look at this question, but it does not answer my question, it checks only the top-level request. My goal is to test that the page is fully loaded and functional, which is not true if any dependent request fails. I do not want to parse the html file and to execute the requests to http resources that I find there. I want to achieve something like a warm-up for the application, so that is why I request the URL several times:

for (($i = 0); $i -lt 5; $i++)
{
     $HttpStatusCode = Invoke-webrequest -URI http://localhost:4203/index.html | select statuscode
     if($HttpStatusCode -eq 200)
     {
     break
     }
}
K. B.
  • 3,342
  • 3
  • 19
  • 32

0 Answers0