Every test we write, every script we run, and every environment we spin up is a choice. These choices might seem small on their own, but over time, they shape our testing practices and influence our everyday decisions.
Some decisions are quick fixes, fast to implement but not always smart in the long run. Others are like planting seeds. They need a bit of care and patience, but they grow into practices that are strong, scalable, and sustainable.
Sustainable testing is about choosing the right seeds to plant today so we can enjoy the benefits tomorrow. Benefits that go beyond just quality, we're talking about better efficiency, less waste, and enabling smoother, smarter collaboration across teams.
But let’s be honest: it can feel uncomfortable at first. Skipping tests, scaling back environments, or streamlining pipelines may seem like you’re doing less. However, in reality, you’re doing what matters more efficiently. Trust in a reduced test setup comes not from cutting blindly, but from sharpening your focus. When your tests are targeted, your environments are right-sized, and your execution is intentional, you often end up with more reliable results, faster feedback, and higher confidence than before.
In this blog, we'll explore the seeds you can sow in your testing practice. Simple actions that, when given the right attention, grow into lasting improvements in performance, cost savings, and environmental impact.
But first, let’s pause and reflect: Have you ever considered the hidden environmental cost of your daily work?
As testers, we're usually focused on finding bugs and delivering quality software. But every time we run tests, we're using energy. Every cloud environment we spin up consumes electricity. Every automated pipeline running overnight draws power from the grid.
Think about it:
- That test suite running 24/7? It's using energy around the clock
- Those multiple testing environments? Each one needs server power
- That comprehensive regression suite? It might be doing more work than necessary
The reality check:
- A single data center can use as much electricity as a small city
- The IT industry creates about 4% of global carbon emissions (more than aviation)
- Software testing infrastructure is a growing part of this footprint
But here's the thing: this isn't just about being environmentally responsible (though that's important). It's about being smarter with our resources. It's about building testing practices that are not only effective but also efficient.
Planting the seeds of sustainable testing
Seed 1: Remove redundant tests
Over time, test suites tend to grow unchecked, accumulating outdated, duplicate, and low-value tests. While once useful, these tests often become irrelevant as systems evolve, but they continue to run, consuming compute cycles and delaying feedback.
Regular audits of your test suite are essential. By identifying and removing deprecated or duplicated tests, you reduce noise and maintenance overhead. Tools like test impact analysis and test coverage graphs can help you assess which tests are still meaningful, highlighting relevance based on recent code changes, overlaps, redundancies, or coverage gaps. This allows you to shift from running everything, every time, to running only what matters. Tagging tests based on risk level or frequency of failure further sharpens execution precision.
What you’ll harvest:
A faster, leaner pipeline with fewer unnecessary cycles, less wasted energy, and higher signal-to-noise ratio in your test results.
Seed 2: Build smarter environments
Modern testing often depends on dynamic, cloud-based infrastructure. However, spinning up full-scale environments for every job can be an overkill, leading to idle computing time, bloated costs, and resource waste.
Instead, aim to right-size your environment. Use containerization (e.g., Docker) to isolate services, allowing lightweight, ephemeral test instances that spin up and down quickly. For components that are unavailable or still in development, service virtualization (e.g., WireMock, Hoverfly) allows teams to simulate interactions without blocking progress. Additionally, shared environments with scheduled access controls can reduce duplication of effort and cloud overhead.
What you’ll harvest:
Better utilization of infrastructure, quicker environment setup, and reduced environmental and financial cost per test run.
Seed 3: Schedule with intention
Test execution strategy matters. Running all tests on every commit might seem thorough, but it often leads to redundancy and excessive infrastructure usage, especially when only a small portion of the code has changed.
Smarter scheduling involves moving toward change-aware pipelines. For example, trigger-based executions, where only affected test suites run based on modified files or components, can dramatically reduce load. Separating fast-feedback smoke tests from full regression suites enables teams to catch blockers early while deferring deeper validation to nightly or scheduled runs. And scheduling heavy pipelines during off-peak hours can align usage with lower energy grid demand, leading to greener operations.
What you’ll harvest:
More responsive CI/CD pipelines, better test orchestration, and sustainable use of computing resources.
Seed 4: Eliminate flaky tests
Few things erode confidence in automation like flaky tests: tests that fail intermittently without any real issue in the codebase. They introduce noise, require reruns, and lead to false positives or negatives, undermining trust in the system.
To manage this, start by tagging and tracking unstable tests across builds. Observability tools and test dashboards can help detect patterns of inconsistent failures. Once identified, fix the root causes: unstable selectors in UI tests, asynchronous timing issues, or environment-dependent behaviors. In some cases, it may be better to remove such tests until they can be stabilized.
What you’ll harvest:
Cleaner test runs, reduced rerun frequency, and a restored trust in your automation pipeline.
Seed 5: Automate with purpose
The promise of test automation is efficiency, but only when it’s applied strategically. Automation for its own sake can become counterproductive, especially when it leads to duplicative checks, bloated test suites, or excessive reliance on fragile UI scripts.
Design your automation suite with intent. Prioritize tests that are high-value and high-frequency. Whenever possible, test functionality at the lowest layer of the stack (e.g., unit or API level), which are typically faster, more stable, and less resource-intensive than UI-level tests. For cross-functional scenarios, build modular, reusable test components that can be configured for multiple use cases.
What you’ll harvest:
Sustainable automation that scales with the application and delivers real return on investment without overwhelming your CI/CD system.
Seed 6: Reduce technical debt
Old test code, outdated frameworks, and tightly coupled scripts are like poor soil, they choke performance and resist change. As systems evolve, legacy tests often become brittle and burdensome, contributing to longer execution times and higher maintenance.
Refactoring and modernization are essential. Adopt lightweight testing frameworks where possible, modularize tests to improve reusability, and remove or rewrite brittle logic. This includes eliminating hard-coded test data, decoupling setup and teardown logic, and implementing clean abstraction layers. Keeping test dependencies up to date is another often-overlooked task that reduces security risks and keeps execution consistent.
What you’ll harvest:
Improved runtime performance, reduced maintenance, and a healthier foundation for future testing needs.
Seed 7: Establish a strategy for reusable test data
Creating new data for every test run, especially in large-scale systems, can slow down pipelines and increase storage demands. Moreover, repeated setup and teardown for identical data structures wastes computing cycles.
Sustainable testing includes building and maintaining a pool of reusable, anonymized test datasets that can be shared across suites and teams. Test data versioning helps maintain consistency across runs and supports reproducibility. In more complex cases, synthetic data can be generated for specific edge scenarios, but this should be a fallback, not the default.
What you’ll harvest:
Faster test setup times, reduced storage costs, and improved data consistency.
Seed 8: Adopt sustainable coding practices
While green coding is often seen as the developer’s responsibility, testers have a significant role to play. Poorly written test code can waste just as much energy and time as inefficient application code.
Write assertions and wait-conditions carefully, besides avoiding excessive polling or retry loops. Use parameterized tests to cover multiple inputs without duplication. Profile your test code for hotspots and refactor loops or recursive calls that consume unnecessary CPU usage. Clean up test artifacts diligently: releasing database locks, closing file handles, or tearing down containers after execution prevents resource leaks and keeps environments clean.
On the collaboration front, testers can advocate for performance profiling, memory-efficient data structures, and lightweight logging standards during design reviews.
What you’ll harvest:
Scalable, high-performing test code and a cleaner, more efficient CI/CD lifecycle.
Seed 9: Build a culture of sustainable testing
Tools and techniques matter, but it’s the culture that makes them stick. When sustainability becomes part of team norms, the impact multiplies.
Share metrics that show improvements, such as reduced test execution times or lower infrastructure usage. Highlight wins during demos and retrospectives and encourage developers and testers alike to think about test efficiency and reuse during code reviews. Even lightweight visibility like dashboards tracking test suite health or flaky test trends, can nudge teams toward more responsible practices.
Leadership support, too, plays a key role. When sustainability is acknowledged as a goal, not just for code quality but also for environmental impact, it becomes easier to secure time and focus on it.
What you’ll harvest:
A team aligned not only on delivering quality but doing it responsibly and sustainably.
Reaping the benefits: Why it’s worth it
Sustainable testing is not about doing less, it's about doing what matters, more intelligently. Like a well-nurtured ecosystem, the benefits build up over time, extending beyond individual projects to shape your team’s mindset and impact.
When you sow sustainable testing practices, here’s what you stand to gain:
- Faster, more reliable pipelines
- Lower infrastructure and cloud costs through optimized resource usage
- Reduced burnout by eliminating firefighting caused by flaky or bloated tests
- Smaller carbon footprint by reducing unnecessary compute cycles
Better collaboration as teams align around purposeful, responsible quality practices
These aren't just quality outcomes, they’re operational, financial, and environmental wins. The return on investment grows with every cycle, every build, and every conversation that prioritizes thoughtful, efficient testing.
The final word: Start small, grow strong
You don’t have to change everything at once. Sustainable testing is about making smart choices, one step at a time.
Some changes will give you quick results, like cleaning up a few old tests or improving your test data. Others, like building a culture of sustainability or refactoring old test code, will take more time and care. But every step helps.
Assess your current testing setup. What’s working well? What feels messy or wasteful?
Now ask yourself:
What small change can I make today that will help us work better tomorrow?
Start there. And keep going. Because small changes, planted with purpose, grow into something bigger. Something better. Something truly sustainable.