1

We have a bunch of jobs which are basically running different Selenium/nose-backed tests in browser. Now what we want is that, any of these jobs should be considered as failed if any 404 status is detected while job is running.

The question is - how to achieve this without noticeable impact on performance?

Currently we are considering to use browser browsermob proxy - and check the HAR file created.

2

This is actually a relatively simple programming exercise: what differs/matters here is how you implement it.

The HAR specifications (linked to from your link) state that the response object will have a key-value pair of "status": [HTTP Status Code (200, 404, 500 etc.)] Their example is

"status":200

The response object is a member of each object in the entries array, and includes a comment object.

I'd start by scanning the HAR file and setting the comment to some kind of failure code if status is 404. How you handle the formatting of the display is up to you.

  • Thanks for response, the question is, though, not about how to parse HAR, this is indeed something doable pretty easily, the question is should we move in this direction at all (see "without impact" phrase). Introducing proxy to all jobs can potentially slow down everything, especially regarding the fact that we have a loooot of jobs. – shabunc Feb 8 '16 at 19:51
  • 1
    If you're looking more for function than load characteristics, you can reduce any impact on overall time by increasing the amount of parallelization in your runs. I'd suggest in that case that you try it and see if the extra information you're getting is worth any time increases - without hard data, it's difficult to do a cost-benefit analysis on your options. – Kate Paulk Feb 9 '16 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.