devops:tests:testing_services
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devops:tests:testing_services [2023/11/01 07:15] – removed - external edit (Unknown date) 127.0.0.1 | devops:tests:testing_services [2024/11/30 16:51] (current) – [Tactics, Approach] skipidar | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Testing Services ===== | ||
+ | ==== Motivation ==== | ||
+ | |||
+ | === Micro Services need " | ||
+ | |||
+ | //Micro services work best with an organizational shift towards " | ||
+ | |||
+ | Throughout the book, I’ve made the case for a loosely coupled architecture and argued that alignment with more autonomous, **loosely coupled, stream-aligned teams** is likely going to deliver the best outcomes. A **shift to a microservice architecture without a shift in organizational structure will blunt** the usefulness of microservices—you may end up paying the (considerable) cost for the architectural change, without getting the return on your investment. I’ve written generally about the **need to reduce coordination between teams to help speed up delivery**, which in turn enables teams to make more decisions for themselves. | ||
+ | |||
+ | Building Microservices, | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
+ | |||
+ | // Low Autonomy Precludes Continuous Business Value // | ||
+ | |||
+ | Designing Autonomous Teams and Services by Nick Tune, Scott Millett | ||
+ | https:// | ||
+ | |||
+ | |||
+ | |||
+ | === Loosely Coupled Organizations are ...=== | ||
+ | |||
+ | |||
+ | // What make a team: " | ||
+ | |||
+ | Characteristics of autonomous, loosley coupled teams, | ||
+ | to achieve the best performance: | ||
+ | |||
+ | * Make large scaled changes, to the **design of their systems**, without the permission of anybody outside the team | ||
+ | * Complete their work, without communicating and coordinating with people outside their team | ||
+ | * Deploy and release their service on demand, regardless other services it depends upon | ||
+ | * **Do most of their testing on demand, without requiring an integrated test-environment** | ||
+ | * Perform deployments in normal business hours with negligiable hours. | ||
+ | |||
+ | |||
+ | Sam Newman about " | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
+ | |||
+ | End-to-end tests for any type of system are at the extreme end of the | ||
+ | scale in terms of functionality they cover, and we are used to them | ||
+ | being more problematic to write and maintain than smaller-scoped | ||
+ | unit tests. Often this is worth it, though, because we want the | ||
+ | confidence that comes from having an end-to-end test use our systems | ||
+ | in the same way a user might. | ||
+ | But with a microservice architecture, | ||
+ | becomes very large. We would now need to run tests across multiple | ||
+ | services, all of which need to be deployed and appropriately | ||
+ | configured for the test scenarios. We also need to be prepared for the | ||
+ | false negatives that occur when environmental issues, such as service | ||
+ | instances dying or network time-outs of failed deployments, | ||
+ | tests to fail. | ||
+ | These forces mean that as your microservice architecture grows, you | ||
+ | will get a diminishing return on investment when it comes to end-to- | ||
+ | end testing. The testing will cost more but won’t manage to give you | ||
+ | the same level of confidence that it did in the past. This will drive you | ||
+ | toward new forms of testing, such as contract-driven testing, as well as | ||
+ | exploring release remediation techniques and ideas like testing in | ||
+ | production. | ||
+ | |||
+ | Building Microservices, | ||
+ | |||
+ | |||
+ | ==== Goal formulation ==== | ||
+ | |||
+ | Achieve independent testing on-demand for teams, without any compromises on the software-quality. | ||
+ | |||
+ | |||
+ | |||
+ | ==== Tactics, Approach ==== | ||
+ | |||
+ | Most of the microservice-projects replace end-to-end tests. | ||
+ | |||
+ | TODO: confirm statement, find citation. | ||
+ | |||
+ | |||
+ | === How to Measure: consider: === | ||
+ | |||
+ | Brian Marick testing quadrant: | ||
+ | |||
+ | https:// | ||
+ | |||
+ | {{https:// | ||
+ | ====== Strategy | ||
+ | |||
+ | ==== Strategy as Trophy ==== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Strategy as Testing Pyramid | ||
+ | |||
+ | https:// | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | |||
+ | |||
+ | ==== Strategy Contract testing over Enterprise-wide-testing ==== | ||
+ | |||
+ | LESS enterprise wide Test environment | ||
+ | https:// | ||
+ | |||
+ | MORE Contract Testing | ||
+ | https:// |