unit-testingtestingfunctional-testing

What is the difference between unit tests and functional tests?


What is the difference between unit tests and functional tests? Can a unit test also test a function?


Solution

  • Unit Test - testing an individual unit, such as a method (function) in a class, with all dependencies mocked up.

    Functional Test - AKA Integration Test, testing a slice of functionality in a system. This will test many methods and may interact with dependencies like Databases or Web Services.