Skip to main content

Testing with Services

  • Chapter
  • First Online:
Microservices From Day One

Abstract

Automated testing is crucial in any software development project. Manually testing a system built from microservices is tedious and error-prone. In some cases, it is well-nigh impossible to test all the possible failure modes by simply exercising the application through exploratory tests executed by human QA personnel. Automating these tests will save hours of time, and it will prevent those bugs that could cost your business millions in profits.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Tobias Clemson, “Testing Strategies in a Microservice Architecture,” November 18, 2014. http://martinfowler.com/articles/microservice-testing/#conclusion-summary

  2. 2.

    Testing nonfunctional requirements will not be shown in this book. Such specifications are most likely the hardest to verify, and short of a full load-testing environment probably impossible to assert.

  3. 3.

    Ian Robinson, “Consumer-Driven Contracts: A Service Evolution Pattern,” June 12, 2006. http://martinfowler.com/articles/consumerDrivenContracts.html

  4. 4.

    Pacto, https://github.com/thoughtworks/pacto ; Pact, https://github.com/realestate-com-au/pact ; Janus, https://github.com/gga/janus

  5. 5.

    https://github.com/dreamhead/moco

  6. 6.

    https://github.com/bbyars/mountebank

  7. 7.

    https://github.com/vcr/vcr

  8. 8.

    http://docs.seleniumhq.org/projects/webdriver/

  9. 9.

    https://cucumber.io/

  10. 10.

    http://getgauge.io/

  11. 11.

    http://martinfowler.com/bliki/TestPyramid.html

  12. 12.

    Tobias Clemson, “Testing Strategies in a Microservice Architecture,” November 18, 2014. http://martinfowler.com/articles/microservice-testing/#conclusion-test-pyramid

  13. 13.

    http://xunitpatterns.com/Test Double.html

  14. 14.

    For a more nuanced distinction between types of doubles, see Fowler’s “Marks Aren’t Stubs” article, January 2, 2007. http://martinfowler.com/articles/mocksArentStubs.html

  15. 15.

    https://github.com/rspec/rspec-mocks

  16. 16.

    https://github.com/bblimke/webmock

  17. 17.

    https://github.com/chrisk/fakeweb

  18. 18.

    See the “Direct Stubbing” section of the Typhoeus gem’s Readme, https://github.com/typhoeus/typhoeus#direct-stubbing

  19. 19.

    https://www.rust-lang.org/

  20. 20.

    https://cucumber.io/docs/reference

  21. 21.

    https://github.com/ruby-json-schema/json-schema

  22. 22.

    http://www.restpatterns.org/HTTP_Status_Codes/422_-_Unprocessable_Entity

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Cloves Carneiro Jr. and Tim Schmelmer

About this chapter

Cite this chapter

Carneiro, C., Schmelmer, T. (2016). Testing with Services. In: Microservices From Day One. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1937-9_9

Download citation

Publish with us

Policies and ethics