Mastering TypeScript - Second Edition by Rozentals Nathan
Author:Rozentals, Nathan
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2017-02-24T05:00:00+00:00
Integration tests
Integration tests are another form of white box tests that allow the object under test to run in an environment close to how it would in real code. In our preceding example, where some code does an asynchronous call to load a block of JSON, an integration test would need to actually call the REST services that generate the JSON. If this REST service relied upon data from a database, then the integration test would need data in the database that matched the integration test scenario. If we were to describe a unit test as having a boundary around the object under test, then an integration test is simply an expansion of this boundary to include dependent objects or services.
Building automated integration tests for your applications will improve the quality of your product immensely. Consider the case of the scenario that we have been using where a block of code calls a REST service for some JSON data. Someone could easily change the structure of the JSON data that the REST service returns. Our unit tests will still pass, as they are not actually calling the REST server-side code, but our application will be broken because the returned JSON is not what we are expecting.
Without integration tests, these types of errors will only be picked up in later stages of manual testing. Thinking about integration tests, implementing specific datasets for integration tests, and building them into your test suite will eliminate these sorts of bugs early.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12571)
Hello! Python by Anthony Briggs(9916)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9779)
Dependency Injection in .NET by Mark Seemann(9340)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8298)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7076)
Microservices with Go by Alexander Shuiskov(6843)
Practical Design Patterns for Java Developers by Miroslav Wengner(6764)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6703)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6414)
Angular Projects - Third Edition by Aristeidis Bampakos(6108)
The Art of Crafting User Stories by The Art of Crafting User Stories(5638)
NetSuite for Consultants - Second Edition by Peter Ries(5570)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5375)
Kotlin in Action by Dmitry Jemerov(5063)
