Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In the excellent http://artofunittesting.com/, 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

 
discard

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.