Getting Started Setting up your Tests Directory - mxunit/mxunit GitHub Wiki
So you’ve downloaded mxunit. Now What? How do you set up your own project? Where do you put your tests?
Everyone hates to hear this, but there’s no one right answer. However, we’re not gonna leave you hangin’ with that lame answer. Here’s what we’ve done (and still do):
- put your tests in a directory named “tests” parallel to your components
- in the same place so they’re easy to find
- separated so you have no danger of accidentally running a “real” component as a test case
- if it matters to you, you probably don’t want to deploy your tests to prod, so you’d need to filter them out somehow (ANT!)
- put your tests in a directory named “tests” underneath your components directory
- same as above
- same as above
- put your tests in a directory named “tests” outside your project
- centralize all your tests in one place
- forces you to find problems where your tests rely on data they shouldn’t be able to see (session info, etc)
- potentially not as intuitive to find tests for a project when getting started initially
- makes it harder to access application-specific data (that might be a good thing though)
- put your tests in the same directory as your components
- extremely easy to see your tests and components together
- you probably don’t want to deploy tests to production so you’d need to use ANT or some other tool to pull those files out during deployments
pros:
cons:
pros
cons
pros
cons
pros
cons