views:

258

answers:

1

I'm attempting to add a Test Settings file to my Unit Tests project in VS2010. All websites seem to simply say "Go to Add New Item > Installed Templates > Test Settings". However, I don't have Test Settings as an option in my Installed Templates (nor does searching for them online turn up any results).

Can someone point me in the right direction for what I need to do?

+2  A: 

Unless they changed this dramatically since VS2k8, you'll see that when you create a new test project, you'll get a new "solution folder" in your solution called "Solution Items" with a .testRunConfiguration file in it which contains the settings.

If not, then you can create the "solution folder" yourself. Right-mouse click on your solution and select Add -> New Solution Folder. Right-mouse click on the folder and select Add -> New Item. Select "Test Run Configuration" under "Categories". If you click on the project, you will not see these choices.

If that doesn't still work in VS2k10, I'll be interested in knowing.

Response to JustLoren's Comment I did a quick Google search and found this: http://social.msdn.microsoft.com/Forums/en/vststest/thread/8ef10a3a-d4d5-4931-9054-df1d81ee4842..

Apparently, they did change the file extension from .testrunconfig to .testsettings in VS2k10. I believe that the key to solving your problem is likely to properly create the Solution Items solution folder and add your configuration file there.

Rice Flour Cookies
Through that I was able to create a .testsettings file like most tutorials reference. I even dragged it down into the UnitTests project. However the menu option "Test > Edit Test Settings" still shows "No Active Settings". Thoughts?
JustLoren
Indeed, putting the testsettings file into `Solution Items` instead of what I had previously named the folder as made all of the difference. Thanks!
JustLoren
Cool. I'm glad I could help. When I create the first test project in a solution in VS2k8, it automatically creates `Solution Items` and puts a default test configuration file in `Solution Items`. I'll be watching out for this odd behavior when we upgrade to VS2k10.
Rice Flour Cookies