Integration tests

Once a service has been verified in isolation, it should be tested along with its dependents in a specific integration or stage environment. Services are rarely used in isolation, and these tests verify that the new build works in conjunction with other dependents. The test cases here should be at the system level and ensure that all the services work together to fulfill the desired behavior as per the requirements. This setup also typically uses production replicas of data stores. This is another place where bugs can be caught before going live.

The testing boundary here is generally the APIs that interact with the UI. The tests start with exercising the APIs at this Facade and validates end-to-end behavior.

Since these tests are higher up in the test pyramid, they focus on more business-related interactions. So, unit tests are more like this:

addTwo(x,y) should return 5, if x is 3 and y is 2   

Integration tests are more like the following:

given user is logged in    
and user clicks on a hotel search listing   item "x"   
then the user should navigates to the   product details page of "x"    
when user  clicks the  "book"   button   
then price check should happen with   backend   
then user should navigate to booking page   
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset