Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

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

share|improve this question

1 Answer 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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