Unit, Integration, and Functional Testing Flashcards
What is a unit?
Smallest testable part of an application.
What is a unit test?
Testing an isolated unit via API.
Are unit tests performed in memory?
Yes. There are no permanent changes.
Are unit tests safe to run over and over again?
Yes.
Do unit tests take a long time to execute?
Not. They’re fast.
What are assertions in unit testing?
A statement that predicate is going to be TRUE.
What do assertions validate?
The correctness of code.
What is an integration test?
Integration tests build on unit tests by combining and testing resulting combinations.
Unlike the focus on unit tests on APIs, integration tests can also include user interfaces and results.
Are integration tests done in one or multiple systems?
It can be either depending on the architecture of the application.
What kind of environment do integration tests use?
Unlike unit tests, they use partial or full environments including persistent layers such as databases and services.
Which is harder to maintain: unit tests or integration tests?
Integration tests.
How is functional testing different than both unit and integration testing?
In functional testing, the focus is on the result, not the code.
What does a functional test check?
It checks a specific feature and compares the result against the specification from which it was created. This is typically in the form of a user workflow.
Is functional testing slower or faster to execute than unit and integration tests?
They are slower.
What is system testing?
System testing is a form of testing that is similar to integration testing, however, uses the complete system.