Unit vs Integration vs Functional Testing

 

Within a test suite, test styles offer different costs and value.

Unit testing: testing individual behavior of an application quickly, in isolation from other tests.

Integration testing: testing application behavior without the restriction of isolation from other tests, allowing shared dependencies

Functional testing: testing application behavior with all functional shared dependencies connected. A subset of integration testing

 
 

As test styles increase in complexity, so does their time of execution, making tradeoffs about them necessary. Unit tests are the fastest to execute, so are used to give quick feedback after developers implement code changes, and therefore encompass the majority of tests within a test suite. At the other extreme, functional tests are the most comprehensive of tests, so are necessary gates to pass through before integrating new code to a deployed product, but are not intended to be run as frequently as unit tests.

 

a strong test suite should have tests separated based on type.

Previous
Previous

Unit Testing: London vs Classical

Next
Next

Testing: The Big Picture