- Microservices Development Cookbook
- Paul Osman
- 173字
- 2021-07-16 17:48:27
Evolving your test suite
Having a good test suite in the first place will help tremendously as you move from a monolith to microservices. Each time you remove functionality from your monolith code base, your tests will need to be updated. It's tempting to replace unit and functional tests in your Rails app with tests that make external network calls to your services, but this approach has a number of downsides. Tests that make external calls will be prone to failures caused by intermittent network connectivity issues and will take an enormous amount of time to run after a while.
Instead of making external network calls, you should modify your monolith tests to stub microservices. Tests that use stubs to represent calls to microservices will be less brittle and will run faster. As long as your microservices satisfy the API contracts you develop, the tests will be reliable indicators of your monolith code base's health. Making backwards-incompatible changes to your microservices is another topic that will be covered in a later recipe.
- EJB 3.1從入門到精通
- 物聯(lián)網(wǎng)安全與深度學習技術(shù)
- Learning QGIS 2.0
- 物聯(lián)網(wǎng)+BIM:構(gòu)建數(shù)字孿生的未來
- 企業(yè)私有云建設(shè)指南
- 互聯(lián)網(wǎng)安全的40個智慧洞見:2014年中國互聯(lián)網(wǎng)安全大會文集
- 數(shù)字調(diào)制解調(diào)技術(shù)的MATLAB與FPGA實現(xiàn):Altera/Verilog版(第2版)
- 圖解手機元器件維修技巧
- 網(wǎng)管員必讀:網(wǎng)絡(luò)管理(第2版)
- TD-LTE無線網(wǎng)絡(luò)規(guī)劃與設(shè)計
- Getting Started with nopCommerce
- 局域網(wǎng)組成實踐
- INSTANT LinkedIn Customization How-to
- LwIP應(yīng)用開發(fā)實戰(zhàn)指南:基于STM32
- 現(xiàn)場綜合化網(wǎng)絡(luò)運營與維護:運營商數(shù)字化轉(zhuǎn)型技術(shù)與實踐