0

In the excellent http://artofunittesting.com/, i saw recommendation to keep logic out of unit tests. Does this hold true for functional/integration tests?

1

I don't believe so. Unit tests are supposed to focus on what 1 method does, mocking anything that method needs. Integration tests don't mock anything, everything should be as if in production. In this case, you may need logic in order to test the fully integrated system.

However, it boils down to definition. For instance, I wouldn't say functional/integration, as if they were tied together. Unit tests are also functional.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.