A good rule of thumb when developing tests is to store only what is needed.  Don’t include content that isn’t necessary for the execution of your tests.  Today I was given a test application that required third party DLLs.  The DLLs were so numerous that they consumed nearly 1G of disk space.  This was unacceptable for two reasons.   First, it would take longer to install the tests over a network environment.  Second, disk space was very limited due to the nature of the product.

I figured that the test application didn’t require every DLL, so I decided to prune the DLL directory leaving only the necessary files.  At first, I was going to remove one DLL at a time.  For each DLL, I would run the test application.  If the application ran successfully, not complaining about missing the DLL, then I would remove it.  It’s not a perfect process because the test application may still need the DLL in some other part of the program not executed.

Just then a friendly developer told me about a free tool called the Dependency Walker.  All you need to do is load a Windows .exe file in this application and it will tell you the DLL dependencies.  For example, I tried the write.exe program that comes with Windows.  It worked great as you can barely see here.

I then tried it on my test application.  Dependency Walker allowed me to export the list as a CSV formatted file for spreadsheets.  I kept what I need and saved tons of space.  Steve Miller wrote the program.  You can find his Texas Ranger Dependency Walker program here:


Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)