Joelle Boulet
Joelle Boulet

Reputation: 390

How to use Selenium to check for memory leaks in javascript app?

I am using java + selenium for automated testing of a javascript web-app. One question that has come 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.

Upvotes: 8

Views: 4604

Answers (3)

Erki M.
Erki M.

Reputation: 5072

Yeah, 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.

Upvotes: 2

Michael Durrant
Michael Durrant

Reputation: 96564

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.

Upvotes: 0

Harri
Harri

Reputation: 2732

Selenium does not monitor any resource usage, it is just a way to emulate user actions. You could use Windows tasklist command to get the memory usage of your browser. Modern browsers spawn many processes so remember to check all of those.

Upvotes: 0

Related Questions