DEV Community

Cover image for Streamlining Microservices Testing With Platform Engineering
Signadot
Signadot

Posted on

Streamlining Microservices Testing With Platform Engineering

Originally posted on The New Stack, by Arjun Iyer.

To improve engineering efficiency, reduce costs and increase system reliability, standardizing testing processes is a critical step.

In the fast-evolving world of microservices, each engineering team often crafts its unique blend of technologies and tools — a sort of polyglot paradise. While this diversity fosters innovation, it introduces a significant challenge when it comes to testing. Teams might pick their own programming languages and tool chains, but as containers and Kubernetes have taught us, standardization in deployment and runtime is invaluable. This need for uniformity extends crucially into testing, a domain fraught with decisions like which tests to prioritize, what metrics to chase and how much to automate.

“We have teams that want to move fast and so don’t bother to write any automated tests and just test and roll back in production. And we have other teams that spend far too much time automating every aspect of their code and ship very slowly!”
Head of engineering effectiveness at a major e-commerce company

This disparity is not just inefficient; it’s expensive, as it leads to redundant efforts and increased maintenance costs. Without standardized testing, teams may duplicate tools and processes, which often results in costlier production issues that consume significant resources, and potentially affect revenue.

The Problem With Nonstandard Testing

Imagine one team diligently automating integration testing with Docker Compose in CI, while another saves their strength for end-to-end (E2E) tests running nightly in staging. A third group might primarily stick to manual testing, only sporadically venturing into automation. This fragmented approach not only endangers the reliability of individual components, but also the system as a whole. It obscures any effort to harmonize metrics around quality, speed and cost throughout the engineering organization. Moreover, remember the old adage: A system is only as strong as its weakest link. Inconsistencies in testing standards can leave your entire system vulnerable to the shortcomings of its least reliable component, potentially opening the floodgates to significant issues down the line.

The Role of Platform Engineering

Platform engineering, an evolution of DevOps principles, focuses on developing internal tools that standardize technical processes and provide self-service capabilities to developers. In the context of testing microservices, platform engineers (PEs) can collaborate with quality assurance teams to forge standardized tools and best practices that the broader engineering team can adopt, thereby ensuring consistency and efficiency.

Key Areas for Standardization by Platform Engineering

Recent industry insights, such as those from the “2023 State of Platform Engineering” by Puppet and “Gartner’s 2024 Software Engineering Priorities,” highlight critical goals and challenges that directly affect platform engineering teams. These reports underscore the importance of efficiency, reliability and speed in software delivery, emphasizing the need for streamlined operations across the software development life cycle (SDLC). Focusing on testing, a pivotal phase of the SDLC, can greatly enhance these aspects. Here’s how platform engineers can align their strategies with these top initiatives:

  1. Test environments: Both reports point to the excessive costs and complexities of managing multiple test environments. By consolidating dev, QA, staging and acceptance into a single, optimized preproduction environment, platform teams can drastically cut overhead and simplify their workflow. This approach not only reduces infrastructure costs but also accelerates the testing process, aligning with the industry’s push toward more efficient development practices.
  2. Early previews of code changes: The importance of early and iterative feedback is a recurring theme in current software engineering discussions. Implementing standardized preview environments allows developers to collaborate more effectively with product managers, QA and UX teams. Despite the complexities involved, establishing these environments is crucial for enhancing the feedback loop in microservices architectures, thereby improving product quality and speeding up iterations.
  3. Shift-left automated testing: According to industry leaders, early detection and resolution of issues are key to maintaining high productivity and product quality. By standardizing the practice of running automated tests prior to merging pull requests, platform engineers ensure that defects are identified and addressed at the earliest possible stage. This proactive approach not only improves the stability of the release but also aligns with the broader goal of enhancing developer productivity and operational efficiency.

These strategic areas of standardization are not merely about improving individual processes, but are integral to elevating the overall effectiveness and efficiency of platform engineering functions.

Core Principles To Guide Standardization in Testing

In the landscape of platform engineering, the benefits for developers are vast, ranging from increased productivity to enhanced quality of software. Notably, developers highlight the advantage of reduced errors and more stable applications, critical in a fast-paced development environment.

Image description
Source: https://www.puppet.com/resources/state-of-platform-engineering

As we steer clear of vanity metrics such as code coverage percentages or the sheer volume of automated tests, which can mislead rather than inform, it’s essential to focus on actionable insights that testing provides rather than its mere existence. The following are a few guiding principles to ensure that testing efforts are genuinely effective:

  1. Outcome over output: Prioritize metrics that directly affect the software’s quality and the user experience, such as defect escape rates or frequency of incidents, rather than outputs that merely count activities.
  2. Value-driven testing: Choosing the right tests involves more than deciding between manual and automated methods; it requires assessing their ROI and maintenance effort. The ideal approach varies by business context. An e-commerce company, for example, might prioritize transactional flows critical to revenue, while a B2B company might focus on different essential user flows. Although end-to-end (E2E) tests are resource-intensive, their potential to safeguard high-value user flows may justify their cost. Effective testing strategies align closely with business objectives, ensuring efforts are concentrated where they deliver the most value.
  3. Iterative improvement: Use metrics to continually refine testing practices. If certain tests consistently yield little to no actionable data, it might be time to revise or retire them.

By focusing on these principles and embracing emerging technologies, teams can align their testing strategies more closely with their core objectives, enhancing both efficiency and effectiveness in their development processes.

Conclusion

When it comes to improving engineering efficiency, reducing costs and increasing system reliability, standardizing testing processes is a critical step.

At Signadot, we build tools that help platform teams simplify and standardize testing and preview environments, enabling a shift-left approach in the development cycle while minimizing infrastructure costs. For instance, Platform engineers at Brex were able to scale developer testing across hundreds of engineers without duplicating infrastructure, and Earnest empowered its developers to conduct early testing in production-like environments, catching issues sooner and reducing costs.

Curious to learn more about how you can implement these strategies in your development process? Visit Signadot’s website to learn more.

Top comments (0)