How green is your testing? Software’s dirty secret revealed.

Automated tests have to run somewhere. Often that means old servers rejected by your dev team. But how green is that, and can you do better?

Automated tests have to run somewhere. Often that means old servers rejected by your dev team. But how green is that, and can you do better?

March 23, 2021
Tamas Cser

Elevate Your Testing Career to a New Level with a Free, Self-Paced Functionize Intelligent Certification

Learn more
Automated tests have to run somewhere. Often that means old servers rejected by your dev team. But how green is that, and can you do better?
Automated tests have to be run somewhere, and often that means using some rack of old servers rejected by your dev team. But how green is that, and can you do better?

You may have heard the fuss recently about the amount of CO2 produced by Bitcoin mining. According to the University of Cambridge, it uses 121TWh of electricity a year, more than the whole of Argentina and almost as much as Norway. The reason why it uses so much electricity is that bitcoin mining is done using high-powered servers. These are typically installed in small server farms in places like the Czech Republic and Russia. But what has that got to do with software testing? Well, traditional test automation also relies on small server farms. And that means software testing has a huge carbon footprint. In this blog, we explore this in more detail and explain how moving testing to the cloud will make it greener. 

Traditional test automation

Traditional test automation relies on scripted frameworks like Selenium. Selenium needs to run on a server and interfaces with your application via its Web Driver. Each Selenium server hosts one version of Web Driver running a single browser at a time. Originally, if you wanted to run the same test across several browsers, you had to either run it on separate machines, all configured individually. Or you had to constantly stop and restart the different versions of Web Driver on your server and run the tests sequentially. Clearly, neither of these is very scalable or productive.

This is where Selenium Grid comes into play. Here, one node becomes a central hub. This acts as a coordinator, assigning tests to one of the nodes, which all run different versions of  Web Driver. This allows you to group a number of servers together and coordinate testing across all of them more effectively. Selenium Grid was a neat solution back when it was new in 2008. That may only be 13 years ago, but that is a very long time in our high-tech world

The reality

When you read about Selenium Grid, maybe you picture a shiny rack full of super-efficient servers all working flat out. Sadly, the truth is often very different. Testing is generally under-resourced and often is used as the dumping ground for all the old development servers. Certainly, few companies are going to invest in shiny new servers for their testing team. The result is, testers are often forced to use end-of-life hardware, which runs inefficiently and needs constant maintenance.  

What is the environmental cost?

You might think it’s a good thing that testers reuse old hardware. After all, we are always being told: “Reduce, Reuse, Recycle”. But the truth is, old servers like these have a huge environmental impact. For a start, they are more inefficient, relying on old power supplies that are probably past their prime. Then there’s the question of the power needed for each processing operation. This is known as performance per watt or FLOPS per watt and measures the overall efficiency of a server. Modern processors are hugely more powerful than older generations and also draw far less power. The upshot is, your testing infrastructure probably has a huge carbon footprint. And that matters in these days of Corporate Social Responsibility.

How does this impact the bottom line?

Testing is sometimes seen as the poor man of the software world. But ask yourself, what is the actual impact of using old infrastructure for all your testing? Well, not only is it not green, but it’s also really ineffective. If you are running on old servers, your tests will run slow and take longer to complete. That will slow down your rate of release. But even if you upgrade to the latest hardware, you still have the problem that Selenium Grid doesn’t scale well. Plus, while you’ve reduced your carbon footprint, you are still running power-hungry servers.

So, how can the cloud help?

As ever, testing seems to lag years behind the curve. Every company already moved its production infrastructure into the cloud. Increasingly, companies are virtualizing all their development servers too. So, why not do the same for your test infrastructure. It’s a logical step and has all sorts of advantages:

  • It’s cheaper. No need to supply and maintain your own hardware. You also only pay for resources you actually use.
  • It’s scalable. Cloud offers the chance to run tens of thousands of tests in parallel. Almost no companies can test in-house at this sort of scale.
  • It’s reliable. Virtual servers are far more resilient than physical servers. This means you won’t need to worry about server failures or downtime.
  • It enables AI-acceleration. Artificial Intelligence requires significant computing power. This is generally only available in the cloud

I heard the cloud isn’t very green?

A few years ago, there were lots of stories in the press about how the cloud has a bigger carbon footprint than the aviation industry. It’s true that cloud data centers used to be really inefficient. However, modern data centers are totally different. For starters, many of them use renewable energy for some or all of their power. For another thing, they have invested heavily in passive cooling systems that need little power to run. They also adopt clever techniques to save power. Like only turning on the lights over servers that need maintenance. The result is, a cloud data center will always be more efficient than any server you own.

Where does Functionize come into this?

Here at Functionize, we believe that testing must always be cloud-first. Indeed, that’s one of the key parts of our manifesto. Our AI-powered smart tests run in the Functionize Test Cloud. This brings lots of benefits. For starters, it allows you to run tests at any scale you need. You can run tests from locations all over the globe. You will have access to your complete test history, thanks to cloud storage. All of that in addition to the benefits of truly intelligent tests. To experience it for yourself, take your first step into cloud-first testing with our free trial.