1

So, I have some e2e for my AngularJS app using Protractor. Typically I run them using grunt and the specified browser appears and well, the test starts.

I would like to sniff the network requests while running protractor, having an external script that is executed at the same time; and for each page tested, extract the network traffic.

Do you know if it's possible and how? Thanks!

Marcos
  • 4,607
  • 7
  • 29
  • 57

1 Answers1

1

consider using BrowserMob, there is an example here on how to record network traffic from a Protractor test using BrowserMob Proxy. and maybe more info on this SO answer. haven't had time yet to try it myself, so let me know if you succeed and if it satisfies your needs!

Community
  • 1
  • 1
vrachlin
  • 867
  • 4
  • 15
  • I've already tried that :) But I cannot get it working (same issue as exposed here https://github.com/afternoon/protractor-browsermob-test/issues ). Thanks anyway. – Marcos Oct 28 '15 at 14:45
  • 1
    will update with another way that i am currently using in my tests. – vrachlin Oct 28 '15 at 14:48