I am using java + selenium for automated testing of a javascript web-app. One question that has e up is memory leaks and how to test for them. Since I am already using selenium for testing the app, is there an easy way to get the memory usage and other profiling information for the web app? (leveraging selenium or/and other automated web-js testing tools)
Currently I'm using chromedriver but will be extending to use the firefox and ie drivers in the future.
I am using java + selenium for automated testing of a javascript web-app. One question that has e up is memory leaks and how to test for them. Since I am already using selenium for testing the app, is there an easy way to get the memory usage and other profiling information for the web app? (leveraging selenium or/and other automated web-js testing tools)
Currently I'm using chromedriver but will be extending to use the firefox and ie drivers in the future.
Share Improve this question edited Jun 10, 2014 at 15:40 oberlies 11.7k5 gold badges67 silver badges115 bronze badges asked Oct 29, 2013 at 19:49 Joelle BouletJoelle Boulet 3904 silver badges12 bronze badges 2- 1 were you able to find any such approach of capturing performance footprint of your website through selenium or any such other tool ? . Request you to share your finding , as it would be helpful for other people . Thanks in advance. – sjethvani Commented Nov 14, 2018 at 18:54
- @sjethvani We did some javascript heap exports by injecting/executing js code via selenium but that didn't end up getting all the info we wanted. I don't work there anymore so I can't post the sample code of how we worked around this problem. – Joelle Boulet Commented Apr 25, 2022 at 15:04
3 Answers
Reset to default 2Yeah, cant be done with selenium solely, take a look into tools like dynaTrace or httpWatch. Those can be integrated with webDriver. Also, take a look at this thread here.
Selenium does not monitor any resource usage, it is just a way to emulate user actions. You could use Windows tasklist
mand to get the memory usage of your browser. Modern browsers spawn many processes so remember to check all of those.
Selenium itself doesn't help report on that.
The main way I could imagine it helping out would be to have a bunch of machines runnning cases with different inputs and expected outputs and make sure that each one gives the correct output when they're run at the same time.