- Continuous Integration,Delivery,and Deployment
- Sander Rossel
- 324字
- 2021-07-02 15:42:09
Integration tests
Checking whether an Add function really adds a and b is nice, but does not really give you an indication that the system as a whole works as well. As said, unit tests only test small and isolated units of code and should not interact with external components (external components are mocked). That is why you will want integration tests as well. Integration tests test whether the system as a whole operates as expected. We need to know whether a record can indeed be saved in and retrieved from a database, that we can request some data from an external service, and that we can log to some file on the filesystem. Or, more practically we can check whether the frontend that was created by the frontend team actually fits the backend that was created by the backend team. If these two teams have had any problems or confusion in communication, the integration tests will, hopefully, sort that out.
Last year, we created a service for a third party who wanted to interface with a system we wrote. The service did not do a lot basically it took the received message and forwarded it to another service that we used internally (and wasn't available outside of the network). The internal service had all of the business rules and could read from, and write to, a database. Furthermore, it would, in some cases, create additional jobs that would be put on a (asynchronous) queue, which is yet another service. Last, a fourth service would pick up any messages from the queue and process them. In order to process a single request, we potentially needed five components (external service, internal service, database, queue, and queue processor). The internal service was thoroughly unit tested, so the business rules were covered. However, that still leaves a lot of room for errors and exceptions when one of the components is not available or has an incompatible interface.
- 在最好的年紀學Python:小學生趣味編程
- Android項目開發入門教程
- 假如C語言是我發明的:講給孩子聽的大師編程課
- 零基礎輕松學SQL Server 2016
- jQuery炫酷應用實例集錦
- Learning AngularJS for .NET Developers
- C++語言程序設計
- Android系統下Java編程詳解
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- DB2SQL性能調優秘笈
- 例解Python:Python編程快速入門踐行指南
- Learning Alfresco Web Scripts
- Developer,Advocate!
- 數據庫技術及應用教程上機指導與習題(第2版)
- R語言編程基礎