Skip to content

Instantly share code, notes, and snippets.

@bsodmike
Last active October 26, 2017 10:32
Show Gist options
  • Save bsodmike/4525870 to your computer and use it in GitHub Desktop.
Save bsodmike/4525870 to your computer and use it in GitHub Desktop.
Differences Between Unit, Functional, and Integration Testing

The difference between those are that unit tests one object and one object only. Typically mocking anything else outside the SUT (System under test).

Integration tests a system of collaborators, or multiple objects that work in concert. Functional tests a system from the outside into the centre as a full stack test. User stories test interactions and outcomes.

The difference between functional and user stories is that a functional test exercises a system with a focus of "given this kind of input, I expect this output back" and user story is more focused on "When I perform this kind of thing, given the system is in this kind of state or has this data, I expect to see this kind of thing as a result."

Functional can also test the side-effects rather than just the input and output.

@bsodmike
Copy link
Author

Credit to @Spaceghost for the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment