According to Steve and Nat (www.mockobjects.com/book)
Acceptance
does the whole system work?
Integration
does our code work against code we can't change?
Unit
do our objects do the right thing, are they
convenient to work with?
Where are functional tests in those leve of testing?
Adam Sroka wrote something that seems to be different:
"Traditionally, "functional test" is a synonym for "system test." It
refers to testing the entire system in the context of that system's
functional requirements. A "unit test" tests a unit in isolation. An
"integration test" tests more than one unit in combination, but not
necessarily the entire system. A system/functional test is a special
case of integration testing where the combination of units being
integrated encompasses at least one route through the entire system.
None of these definitions considers who owns the components being
tested."
According to Adam, an integration test does not mean we can't change
the code, it is just a system test.
Eventually the picture I've got in my mind is:
Developer tests:
- Unit tests :
Isolated, atomic, innocous: exercised with xUnit
- Integration tests
Isolated tests that might change the state of the
system, i.e: saving into database, writing file...
An integration test does not represent a functional
requirement as is.
Can be written for xUnit. They check the integration
of our coude with a third party tool or with the different layers of
our own code,
i.e: the business logic layer requires the data access layer
- Functional tests (also known as System tests):
A test that excersises part of the system as a whole,
some functional requirement. It might change the status of the system.
Product Owner tests:
- Acceptance tests:
Functional tests which input and output can be
validated by a non-technical person, the product owner.
Would you agree with this?
Why do I need to be that precise with these definitions?
I am writing a book on TDD in Spanish and would like to be precise. To
me, that fact that I am writing a test and I can't tell what kind
of test it is, is a code smell, either in the test or in the sut. So I
consider that making clear the type of tests is important.
Hopefully the book will be ready before the end of 2009
Thanks :-)