{"id":13086,"date":"2016-03-28T00:00:00","date_gmt":"2016-03-28T05:00:00","guid":{"rendered":"https:\/\/centricconsulting.com\/post\/test-automation-microservice-oriented-enterprise\/"},"modified":"2021-12-15T00:12:50","modified_gmt":"2021-12-15T05:12:50","slug":"test-automation-microservice-oriented-enterprise","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/test-automation-microservice-oriented-enterprise\/","title":{"rendered":"Test Automation in the \u201cMicroservice\u201d Oriented Enterprise"},"content":{"rendered":"

How we got here\u2026<\/h2>\n

One of the goals of an agile process is to make quality a first-class citizen in the software development process. We talk about testing when we plan feature development, but testing professionals are not included in the discussions when we talk about application architecture and design. This is a missed opportunity.<\/p>\n

In the next few paragraphs, we\u2019ll explore evolution of software design from the perspective of a testing professional with the goal of giving an understanding of high-level application architecture and then provide a few options for testing.<\/p>\n

The Monolith<\/h2>\n

\"1\"<\/a><\/p>\n

Our applications have evolved. We started with monolithic, all-in-one systems that are fairly easy to write and fairly simple to test. But as we add more code (even in a time-boxed agile process), our testing effort is always increasing.<\/p>\n

\"2\"<\/a><\/p>\n

When we deploy, we always deploy everything \u2013 even if we didn\u2019t change it.<\/p>\n

We found ourselves in a state where it\u2019s pretty easy to write code and testing is a solved problem, but the time to test is always increasing. Therefore, getting code to production is now quite an effort in unpredictable time.<\/p>\n

(There are also development and architectural problems with a monolithic approach to applications that we will not get into at this time.)<\/p>\n

Our answer was to make our applications smaller.<\/p>\n

Service-oriented Applications (SOA)<\/h2>\n

In moving to SOA, we broke apart our applications into their logical subsystems and treated each subsystem as a separate application, so each application now has much smaller scope and vastly less code to test. We still have the problem of an ever increasing code base, but it\u2019s more manageable.<\/p>\n

\"3\"<\/a><\/p>\n

Each application connects to any dependant applications over some type of common communications structure; HTTP is very popular for this purpose. So when each application requires some functionality from another application, it simply makes a request over that common communication structure\u2026which led us to the dreaded, \u201cSpaghetti Diagram.\u201d<\/p>\n

\"4\"<\/a><\/p>\n

Our applications were now simpler, but their interactions were vastly more complex, making testing them very difficult. We traded a tightly coupled monolith for a tightly coupled enterprise application and we didn\u2019t really have the skills to test at the network layer in our testing professionals. Because of the tight-coupling and unknown dependencies, it was still tough to test and get into production.<\/p>\n

Shared Messaging Infrastructure<\/h2>\n

An answer to tightly-coupled SOA applications is to use a \u201cShared Messaging\u201d infrastructure to orchestrate the interaction between components. Applications in the system simply generate messages and await responses, while the enterprise infrastructure manages routing messages and responses.<\/p>\n

The content of the payloads that are passed between the two are governed by the enterprise application team and agreed on as a standard of communications. These agreements are often called contracts.<\/p>\n

Other benefits include;<\/p>\n