Automated testing for memory leaks

Experiences, small talk, and other automation gossip.
Erik S
Posts: 1
Joined: Wed Jul 05, 2017 10:10 am

Automated testing for memory leaks

Post by Erik S » Wed Jul 05, 2017 10:51 am

We want to do automated regression testing for memory leaks on our WPF .NET application. The scenario is pretty simple: after a series of UI steps, we want to find the number of instances of a particular object. If count == x then good, if count > x then bad.

Options we have now:
- Automate the UI of JetBrains dotMemory. Problem is that we have more Ranorex users than licenses for dotMemory.
- Automate the UI of CLRProfiler, as a last step copy the search result from CLRProfiler to the clipboard and use Ranorex to parse the clipboard content. This should work but it feels a bit clumsy.

Are there any other options to count instances of an object in memory using Ranorex?

zivshapirawork
Posts: 62
Joined: Wed Sep 24, 2014 7:47 am
Location: Israel

Re: Automated testing for memory leaks

Post by zivshapirawork » Wed Jul 26, 2017 6:22 am

maybe you can use the C# weakreference to access objects via C# code?