Logo

dev-resources.site

for different kinds of informations.

Integration Testing : Concept

Published at
7/26/2024
Categories
testing
beginners
typescript
integrationtesting
Author
jay818
Author
6 person written this
jay818
open
Integration Testing : Concept

Integration Testing

What

In Integration Testing we test how all the components work together, means unlike unit tests we don't have to mock out the services. We actually start all the services in the integration test and see how they work together.

Downside to this is that it is slower, as we have to start all the auxiliary services.

Here is a gist of what we have to do in the Integration Testing

Testing

How

To do the integration test we will use scripts and docker compose file.

  • docker-compose.yml file - It will start all the services
  • script file - It will run docker compose file, wait for our DB , migrate the DB , Do the Intial Seeding and run all the tests.

run-integration.sh

docker-compose up -d
echo '๐ŸŸก - Waiting for database to be ready...'
# The below command will wait for the DB after that all the command run.
./wait-for-it.sh "postgresql://postgres:mysecretpassword@localhost:5432/postgres" -- echo '๐ŸŸข - Database is ready!'
npx prisma migrate dev --name init
npm run test
docker-compose down

# To run this file simply do `run-integration.sh` + you need to install wait-for-it.sh from github.
# curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -o scripts/wait-for-it.sh
Enter fullscreen mode Exit fullscreen mode

For All the Steps Visit - 100xdevs Integration Testing

Thanks

integrationtesting Article's
30 articles in total
Favicon
Top 7 Best Integration Testing Tools for 2025
Favicon
Unit Test vs. Integration Test
Favicon
Choose Boring Releases
Favicon
The Struggle for Microservice Integration Testing
Favicon
Integration Testing in React: Best Practices with Testing Library
Favicon
Integration Testing in .NET: A Practical Guide to Tools and Techniques
Favicon
Testing Modular Monoliths: System Integration Testing
Favicon
Integration Testing : Concept
Favicon
The Complete Guide to Integration Testing
Favicon
End to End Testing vs Integration Testing โ€“ 7 Key Differences
Favicon
How to improve test isolation in integration testing using Jest and testcontainers
Favicon
๐Ÿš€ Effortless Integration Tests with Testcontainers in Golang ๐Ÿงช
Favicon
Testcontainers - Integration Testing Using Docker In .NET
Favicon
Simple Mocks With Mockaco
Favicon
Ace Your Tests with Mocha, Chai, Sinon, and the Clean Architecture
Favicon
Testing Made Easy with Ava: No More Pulling Out Your Hair!
Favicon
Nock: The Purr-fect Tool for Testing HTTP Interactions!
Favicon
Take Your Mocktail Game to the Next Level with Sinon.js: The Fun Way to Test Your Code
Favicon
Get Your Chai Fix and Learn the Art of Assertions at the Same Time
Favicon
Mocha Testing: The Java in Your Script
Favicon
The ultimate guide to Jest: turn your testing woes into rainbows and unicorns
Favicon
Get Your Test On with Jasmine: The Happy Way to Ensure Quality
Favicon
Experience the joy of stress-free coding with unit and integration testing!
Favicon
Boost Your Productivity with These Top-Notch JavaScript Testing Libraries! (2022)
Favicon
What is Integration Testing?
Favicon
Automated integration testing - what features help?
Favicon
When should integration testing be automated?
Favicon
Azure Functions E2E Testing within GitHub Actions
Favicon
Differentiate between integration testing and system testing
Favicon
Beginners' Introduction to React Testing

Featured ones: