In this chapter, we will look at ways and examples of testing network-related code. Using unit and integration testing techniques, we strive to capture the known and expected behavior. A unit test should ideally avoid all external factors. For example, a test that leverages the network is most accurately described as an integration test. The network (being external) to our code may exert undo influence such as delays or limiting payload size. It is not always easy to know how to design a test, much less how to separate ...
17. Testing
Get Network Programming with Go Language: Essential Skills for Programming, Using and Securing Networks with Open Source Google Golang now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.