Place for Test-projects in projects structure

别来无恙 提交于 2019-12-24 16:05:00

问题


Below you can see my current project structure. But I am not fully happy with it. The main problem is that I don't know where to put Test projects.

According to the title, it would be logically to put YML.Tests inside YML folder. But in this case I will mix YML project structure and YML.Tests project folder (it is not critical but I don't like it).

Another way is to rename YML.Tests to YMLTests and then there will be less reasons to put YMLTests inside YML. But then I will want to combine YML and YMLTests into one folder. And I have to idea how to name it. YML? Then YML project will be inside one more YML folder.

Hm... Any ideas how to make it better?


回答1:


The organizational structure of the projects in your solution should be designed to maximize your productivity when working in the solution. Some of the factors that affect your productivity are project size, logical grouping, and navigational ease.

In this case I think you are wrestling with two different competing organizational concepts:

  • organization by software product function (feeds, extractors, etc.)
  • organization by software development function (implementation, test, etc.)

As a result, you could create a separate test tree that doesn't "pollute" your implementation tree but doing so might create a big problem for navigational ease if you constantly switch between implementation and test for the same feature area.

In the end, any organizational structure has to make some compromises, but given that you appear to be serious about test-driven development, I think the organization you've proposed is pretty good. It's commonly used, and while it has its flaws, it is workable and productive for daily use development.



来源:https://stackoverflow.com/questions/5741392/place-for-test-projects-in-projects-structure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!