lightbody / browsermob-proxy

A free utility to help web developers watch and manipulate network traffic from their AJAX applications.
http://bmp.lightbody.net
Apache License 2.0
2.16k stars 652 forks source link

Parallel execution of selenium tests per single instance of browsermob-proxy #655

Open ianwatsonrh opened 7 years ago

ianwatsonrh commented 7 years ago

Hi

I'm looking for some advise around parallel execution of selenium tests that run in selenium grid.

Would each test require its own browsermob-proxy?

Hopefully not as that will likely not achievable.

If a browsermob-proxy can be shared how do I ensure that the network traffic is not merged with requests from different tests coming in at the same time?

Cheers Ian

sysundeep1 commented 6 years ago

Hello, Have you found any solution related to the query above? I am facing the same issue. Any help would be appreciated :)

Thanks.

bezda commented 6 years ago

Hi, we've been trying to do the same. As far as I know, there are two options

We went with option two, we have a pool of port numbers (size of pool = max parallel tests) where we get the port from before browser is opened, start the proxy, run the tests and return port to pool.

Unfortunately it seems like BMP is having some race condition when we run 100 proxies in parallel and send about 300 https requests per page load (please don't ask why...) and sometimes doesn't respond to requests correctly which we're still trying to resolve...

P.S.: We're running Selenium tests