Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I place the unit test project within the same repository as the main project?

Using Visual Studio, I have one solution containing two different projects: a main project and a test project for unit tests. My .git folder for the relevant repository is inside the directory containing the main project, and nothing related to the testing project is currently tracked by GitHub.

If I move the .git directory up one level, then all my projects/solutions that I've ever created with VS would be tracked by that single repository.

What do I need to do to combine both the projects into one single repository, considering they are in separate directories?

like image 597
nhershy Avatar asked Oct 15 '25 05:10

nhershy


1 Answers

all projects within your solution should be in one repository ( there are exceptions if you are using submodules )

Unit tests have to be in synch with your code, they change as your codes changes.

So yes, in the same repository.

One folder structure that works ok for .net

Root/
   Solution Folder/
       Solution.sln
       Main Project/
       Test Project/
like image 115
Keith Nicholas Avatar answered Oct 16 '25 20:10

Keith Nicholas