Question

I have got some basic working knowledge of YourKit Java profiler. I want to perform memory & CPU profiling of my Selenium WebDriver+TestNG framework. It contains a large number of tests in the form of PageObject classes and Test classes. I have checked out for any online resource that can show some direction on how to do this but could not find any.

Has anyone done memory+CPU profiling on webdriver+TestNG tests? Is it possible first of all to do memory profiling of such java applications? Need some directions.

Was it helpful?

Solution

Profiling tests is a bit tricky affair due to number of factors involved like effects of parallel test execution or sequence of test execution . You can get an overall picture for memory or cpu by having the visualvm (or even jconsole ) monitoring on your tests . For getting statistics for individual tests i believe you need to have a professional profiler (i am not aware about any open source tools to do that ) . I don't prefer intrusive profilers for performance tests , hence you can also get an overall picture of the CPU samples during the tests using Hprof as well .

Having said that nowadays most ides have pretty good profilers (or at least profiler plug-in) and if you are required to give a rough estimate of the cpu and memory numbers you can use them as well .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top