Abstract
In this chapter, you’ll see the importance of having good test suites in a distributed system. You’ll realize how Cucumber and structuring the test project into layers can provide a simple and powerful solution to cover an end-to-end strategy. Cucumber provides a business-friendly language to design the test cases—Gherkin—and it integrates with Java, so it’s a choice that combines perfectly with our use case.
Also, the chapter pays extra attention to some details that can ease development—step parameterization and reusability, understanding how Cucumber works when instantiating tests, and how to benefit from dependency injection. And, most importantly, you’ll see how making your code testable makes everything simpler just by adding some optional logic to your services.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2017 Moises Macero
About this chapter
Cite this chapter
Macero, M. (2017). Testing the Distributed System. In: Learn Microservices with Spring Boot. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3165-4_6
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3165-4_6
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3164-7
Online ISBN: 978-1-4842-3165-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)