Node.js
/Intermediate
Integration Testing
Definition
The phase in software testing where individual software modules are combined and tested as a group to verify they work together correctly.
Explain Like I'm New
If Unit Testing is verifying the puzzle pieces individually, Integration Testing is verifying that two pieces actually snap together. Does the Express Route properly talk to the Mongoose Model, and does the Mongoose Model successfully write to the Test Database?
Real World Example
Spinning up an in-memory MongoDB server (using `mongodb-memory-server`), sending a Supertest request to your API, and verifying the data was actually written to the database.
Common Use Cases
- •Testing database queries
- •Verifying middleware pipelines
- •Testing 3rd party API integrations
Interactive Example
Loading...
Console output will appear here...
Interview Questions
basic
- Is an Integration Test generally faster or slower than a Unit Test?
intermediate
- Why do we use separate 'Test Databases' for Integration tests?