So far I’ve always stored my unit test on my HDD, as I’m the only one in the company to actually care about them, but I’m thinking of cheking them in the repository in order to use them in my CI server, and look into code coverage, so I’m wondering… where do you find the corresponding projects to be better stored in a SVN repository? along with the projects they “cover”, or in their own project structure?
Idea 1:
Project A\trunk\Project A
Project A\trunk\Project A.Tests
Idea 2:
Project A\trunk\Project A
Unit Tests\trunk\Project A.Tests
I see their own pros and cons to both possibilities, so I just want to get a small push :P.
Tests are part of the product but only used by your company. You should check them in and version control them.
I suggest the first option as then the tests as seen as part of project A and not as something separate.
Also by checking them in, if other access this code, then they get to see it and thus you get them looking at tests, even if they never write any, they can use them to verify that the stuff they’ve done hasn’t broken anything. If anything this is the most important reason for having the tests.