Can you test with Serverless Computing?

Can you test with Serverless Computing? Bob Reselman (Guest Author) June 7, 2017

April 21, 2026 · 7 min read · Testing Guide

Can you test with Serverless Computing?

Bob Reselman (Guest Author)
June 7, 2017

Seems that there is little doubt these days that serverless cypher is all the fury. We ’ ve moved from the world of covering scarper on & nbsp;Virtual Machines,& nbsp; through less resource strict & nbsp;Containers, to a place where the function ends up being the deployment unit of the hereafter. Seems as if everybody is spring on board with the idea. Amazon has & nbsp;AWS Lambda, Microsoft offers & nbsp;Azure Functions& nbsp; and Google is sneaking in with & nbsp;Cloud Functions.

The Premise of Serverless Functions

The premise of all the products is similar. Instead of make software that is made up as an aggregation of data and behaviors represented as a distinct application which is deployed into a virtual machine or container, with serverless computing all you deploy is a function that resides in a host ’ s public cloud, not to a particular machine. Then, the function is wired to one or many mechanics that initiation executing, a response to a shout to an URL in AWS ’ s API Gateway or to a message incur on Azure Queue storage, for example.

Great. So, what ’ s the benefit? Well, if you mind to the powers that be and the selling departments at AWS, Microsoft and Google Cloud, you pay only for the performance you use and you don ’ t necessitate to hold any developer on payroll scaling your infrastructure up or downward to optimize your costs. Scaling is built into the products.

Again, outstanding. But it ’ s not really a new idea. We ’ ve been here before. For those of us old enough to remember, calling a single function in another process outside of a client computing environment is called a remote routine call (RPC). The concept and the engineering to fulfill the concept has been around in commercial-grade use since 1981 when Xerox released Courier and later made a bit more mainstream in 1984 under Sun RPC. But, that was then and this now. Serverless computing is the current bright, shiny, object and will be with us until something else comes along. Why? Mostly I think because AWS unloosen Lambda Functions which caught on and Microsoft want to experience an analogous technology to keep and turn it ’ s market share? Why is Google jumping into the fray? Dunno. Maybe because it can?

So how execute this play out for those developer that have to get products in the real world? It seem that the future architecture of applications will be a client/serverless model in which the client will be a phone, pad or desktop figurer aboriginal application or browser page wired under HTTP and its cousins (think: XMPP or AMQP), to an API in which each endpoint is bound to a serverless role. Those functions might indeed fulfill other serverless purpose by way of calls to endpoints accessed internally within the given function, (See Figure 1, below.) which is all good and good except when it comes to testing.

Testing, or Lack Thereof, in the Age of Serverless Computing

I am a proponent of Test Driven Development. I apply to be uttermost about it. Now I am pragmatic. When it comes to coding for cash, I like to shew that all the codification I ’ ve written has be exercised and that the code works as anticipate. Thus, two account are indispensable to me: Test Pass/Fail and Code Coverage. I want all my tests – Happy Path and Unhappy Path – to surpass and I want to make sure that these tests continue at least 90 % of the codebase, if not 100 %. This is at the developer level.

At the systems degree, meet execution standards as easily as not blow up machine by eating memory, pegging CPUs and gobbling disk space needs to be guarantee via repeatable testing mechanisms.

SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses.

Now, all of the tests described above are possible when you “ own the box ” albeit existent or virtual. But when the box goes away, e.g., serverless computing, you are in real trouble, for a miscellany of reasons. Your test process becomes fragment and disparate. Unit testing and code coverage can be ensured to be reproducible between developer machines and theUninterrupted Integration/Continuous Deployment (CI/CD)check-in process because you can run the same testing tools locally and in the CI/CD environment. Thus, give that your data is coherent, trial legislate on the developer machine should pass in CI/CD. No problem.

But, say bye to your unit examination and code coverage mechanisms when you start deploy to the serverless environs. Yeah, you can build in test calls as part of the internals of the map being deployed, but such an approach is a kludgy long-shot. & nbsp; And, there is no way you are going to get code coverage measurement among all the client telephone to functions via the given API. Remember the functions do not dwell on a machine that can also run the codification reportage tools: can ’ t amount what you can ’ t see. So how do we screen? Seems that the way to test is to go to integration testing, system and performance testing while taking a Behavior Driven Development (BDD) approach.

Many of us have come to translate that a key ingredient of testing is environmental consistency, that each testing environment should be identical to the adjacent: same OS, like memory configuration, same libraries to the version level, etc…. Even the like physical ironware, if possible. But, when it comes to testing in the serverless computing environs, after having somehow reckon out how reliably and repeatedly deploy the hundreds of functions you ’ ve written and tested in Development, how do we really know that our QA environment is very to our Staging surround which is, in turn, identical to our Production environment? Having some operational familiarity with AWS Lambda use, I can tell you that all you really know is ... your account ID.

So you put your hundred or so functions up there and hope for the best. And so something goes wrong, say an unexpected memory consumption in production. Now what? All you have are the application logs and maybe, just perchance some system logs. There is no debugging in your serverless Staging environment. (Yes, I know, nobody debugs directly in Production, but remote debugging against Staging is not unheard of.) And, all you have is your host provider ’ s tidings that the environments are reproducible, if not very. But, still you hold the problem and you are back to the 1980s approach to debugging: looking at the logs, which at that point you get kicking yourself because your team never genuinely discussed logging insurance and come up with a way to ensure that the information you will most probably need in the event of disaster is available.

Of course, as is typical, thing start locomote south on Friday before tiffin. Hence, you call your substantial other and opt out of weekend plan. Then you hope your company bought a reasonable support program from the provider so that you don ’ t have to go it alone solving the problem. Such is living in the universe of serverless computing.

Another Bright, Shiny Thing?

Technical innovation is a pendulum swinging between two point, centralized computation and decentralized computation. When the mainframe came out the pendulum went to toward the centralized end of the spectrum. The Parousia of the PC sent it the other way toward the decentralized end. The Internet and the outgrowth of the cloud seems to be direct the pendulum back toward centralization – millions of users connected to the motherships of all the Facebooks, Spotify and Snapchat ’ s in the world.

However, each swing of the pendulum is not the same. Every time the pendulum depart back and forth, there is something a bit new about the swing. Are we moving in the direction in which there will be three key cloud providers, AWS, Azure and Google Cloud? Seems that way. But when you appear under the covers, there is not one master machine for each supplier, rather billions and billions of nodes of commodity ironware living in hundreds of data-centers. So, in a way this is a new eccentric of trip on the pendulum ’ s journeying toward centralisation.

Is serverless functions going to be a vivid, shiny, object on the landscape of cutting edge cloud cypher? Dunno. There are a lot of time and resources be devoted to the technology by all the company involved. So the odds of success are good. However, in order to get serverless computing real world, processes and products need to be developed that allow companies to consistently and reliably prove the software destined for the serverless environs. For now, Behavior Driven Testing methods that supervise and archive test upshot twin with strict logging policies that keep track of internal deportment will do, but not for long. The volume of activity anticipated on the horizon of serverless figure demands better mechanization tools and automated techniques, particularly around deployment and testing. Otherwise, we run the risk of serverless compute being cool only because the providers say it is. And as we have learned on the terrain, a bright, glazed object is only as interesting as the others that have yet to appear. & nbsp; If you receive other ideas on how you ’ d test in serverless surroundings, I ’ d love to hear them!

Quality Engineering Resources

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free