简体   繁体   中英

How do you organize your tests projects

I've been following the UnitTest.proj & IntegrationTest.proj per component practice for a while now. However, I'm finding that as my solution grows things start getting messy with all the tests projects etc... Also, I'm exploring some BDD tools so now I may have to add another project (specs) to hold my specifications. What I'm thinking about doing is to create one test project per component then have folders and namespaces for Unit / Integration / Specs. The have my build server discriminate on which tests to run based on the namespace. So my CI builds will run Unit*.* and the nightly build will run all of them. Am I totally crazy here? I'm interesting in hearing how people organize their test projects.

Thanks,

In NUnit (and presumably in other test frameworks) you can assign categories to tests. This enables you to combine different types of test into a single source file, and pick and choose which types of tests to run. This is useful if you want to distinguish long-running tests, for example.

You might use this technique to cut down the number of projects you need, even if you choose to keep the same number of test source files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM