Quote:Why separating both ?
These are Unit Tests. There very purpose is to ensure that a particular Unit (module) functions as required, independent of the other Units. It helps ensure that Separation of Concerns[^] is practiced properly.
Nicolas Dorier wrote:Such test, even with a database takes less than a second to run.
And if you have a set of 20 or more such tests, that increases the time to run your unit tests by 20 or so seconds. The CI server will do the kind of testing you're talking about (Integration Tests). I prefer to have Unit Tests run frequently - that is their entire purpose. Personally, I use Test-Driven-Development practices as much as possible, which means that the Unit Tests help drive the entire development process. If they take too long to run, they break the smooth flow of development.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."