Welcome!

Microservices Expo Authors: Madhavan Krishnan, VP, Cloud Solutions, Virtusa, Jason Bloomberg, Pat Romanski, Elizabeth White, Liz McMillan

Related Topics: Microservices Expo, Java IoT, Industrial IoT, @CloudExpo

Microservices Expo: Article

Make Sure It Doesn’t Suck: Good App Testing Despite Vague Requirements

What Are We Testing For?

Where do I start? What am I doing? (Why am I even here?) Have you ever asked yourself these questions at the beginning of a performance testing project? Have you been one of the many test engineers who have been delivered an application and told to "just test it"? (True story: I was once handed off an application to lead a performance testing project on with these words of guidance, "Just test it to make sure it doesn't suck"). If you are one of the fortunate performance test engineers who have a well-defined process in place in your organization that dictates what are you testing, what you are looking for, etc., then this discussion might not be for you. But for the rest of us, those of us that might need a little guidance in starting our project, read on......

What Are We Testing? What Are We Testing For?
I don't believe there is any one right way to approach a load testing project. And while there may be several different methodologies, I think ultimately they all take us in the direction of identifying a similar starting point. And while my discussion here certainly will not include every detail one should consider, my goal is to provide you with some ideas and practices to get you on your way.

Before we can begin any kind of testing project, we need a game plan. We need to know what we will test and what determines a successful test. We need to determine whether the application we're testing is "good" or "bad". It's common to think that only functional tests have pass or fail conditions but load tests should usually also have criteria defined to dictate whether the application's performance passes or fails.

Essentially what we're talking about here is coming up with the best approach to develop a load/performance testing Test Plan...or at least the "goals" part of a test plan. (A good test plan should include a lot of additional information - schedules, roles of team members, tools to be used, etc. - that I won't discuss here). The key is determining how we're supposed to approach this application-to-test that was just presented to us.

This game plan should be comprised of three pieces. One, what is the activity that the end users of the application do? (What are our use-cases?) Two, how many of these users are there doing whatever they do? (What is our workload, e.g. concurrency and/or transaction rate?) And finally, how fast do we need the application to allow these users to whatever they do? (What are our performance requirements)? Let's take each one of these at a time.

Identify Use Cases
Now that I have this new application in my hands, how can I determine what a user is supposed to do with it? The best approach to answer this question is usually simply to ask someone. Ah, but who to ask? Ideally, a good start would be to find someone involved in developing product requirements. At some point someone had a thought, "We should build an application so that users can do something". Identifying who that person was and what that "something" is, is the key.

I typically like to start with someone in product marketing or product management - someone who has done the work to create the user scenarios that the development team has implemented. If you're lucky, you might be able to find a Marketing (or Product) Requirements Document that has this information documented. Otherwise, a conversation with someone in that department might prove very useful.

If this information is not documented anywhere (gasp!) and the application is one that is currently in production, there will probably be some useful information in the log files captured in the application's infrastructure. Ask your web or application server administrative team if this is information they capture. They may use tools like Omniture, Coremetrics, Web Trends or Google Analytics that can help provide this. If they don't, it's usually possible to turn on some sort of logging for a period of time (a day or two perhaps) so that tracing user activity can be captured. In addition, getting access to actual end-users could be very helpful. As a performance engineer, it's probably not feasible that you have contact with the user community but this is a conversation you might be able to start with another internal resource - customer or technical support teams, sales representative, or (again) marketing folks.

Finally, common sense is an approach that can be very useful. (As obvious as this may seem, I'm constantly surprised by the number of times "common sense" is overlooked). Take a look at the application itself and decide what it is that YOU might do if you were an end-user. If you're testing an online store type of application, it's a pretty good bet that users are going to browse through the product catalog, add items to a shopping cart and make a purchase or two. Online banking customers are probably checking their balance and paying bills... you get the idea.

Generally speaking, you should not waste time trying to identify every single use case through the application since the bulk of user traffic will be captured in only a few transactions. Keep in mind the famous "80/20 rule"; that is 20% of the transactions cover 80% of application's core functionality.

Calculate Workload
So now you've got a start on identifying the first piece of the load test project puzzle; the use cases to be modeled in your load testing processes and/or load testing tool. Next we need to identify the actual workload that will be used in our load testing - that is, how many simultaneous users that will be sending network traffic against the application we're testing.

The best process to find out this information follows that of identifying the use-cases that we discussed earlier - again, try talking to someone "in the know". The application's specification documents should detail the expected user load or expected transaction rates. If they don't and you are to test an application which is already in production, working with the administrators of the applications architecture can again be helpful. They should be able to give you a sense of what sort of user load the application has experienced. When looking at this data, be sure to use a wide enough data sample to find the peak load the application has seen.

If this is an application that is not in use yet, many of the same principles we discussed in determining use cases apply; talk to marketing people, determine what the expected loads are. Even if you are conducting tests due some expected increased load in the application; a sale or promotion, an expected seasonal rush, rolling out an internal application to a new set of employees, etc., the hope is the expectation of load has been documented somewhere.

You may also be able to determine the number of users to test for by using a formula known as "Little's Law". This formula is only really applicable if you have either determined baseline throughput (transactions per second) and transaction response times or if you have desired requirements for both. But if you do have this information, using this formula is a great way to figure out how many users to test for:

  • Number of Users = Response Time * Transactions/second

There are many articles on the web about Little's Law and the different ways it can be applied. If you have access to the "inputs" of this formula, I'd recommend doing some extra research and seeing how it might be of use to you.

Generally speaking, once I determine the peak usage load my application will handle (or hope to handle) in production, I will conduct load tests scaling to 110% of that number.

Establish Performance Requirements
So now we know how to find what use cases to model and how many concurrent users to test for. Now what? Surely we can start to execute some load and performance tests, no? Well yes we can. However, it seems that we still don't know what we are testing for. I.e. why are we even conducting this project?

This is where developing good requirements come in. As I mentioned earlier, we need to figure out just what we're looking for as the results of our testing. To me, test requirements fall into two high-level buckets: Baseline/Benchmark or Performance Requirements.

A Baseline or Benchmark test doesn't usually have any detailed pass or fail criteria. Instead it allows you to provide results that state, "under these circumstances, the application performed like this". Benchmark tests can of course be very useful for examining the impact of infrastructure changes. Conduct an initial baseline test, modify the infrastructure, run the exact test again and compare the "before" and "after" results. The results of your initial baseline test can always serve as a performance benchmark.

Performance requirements on the other hand can help us determined whether the application is ready to be delivered to production.

What just is a performance requirement? As I've indicated, this essentially is the indicator of whether your performance test passed or failed. It may be response time-based (e.g. the Login transaction must always be faster than 3 seconds), it may be load-based (e.g. the website must be able to withstand 1000 concurrent users, how many concurrent users will my site handle before it crashes), it may be transaction rate based (e.g. the application must be able to handle 100 orders per minute) or it may be combinations of all of the above. Requirements may also include details on how the back-end infrastructure behaves (e.g. CPU utilization on the database server may never exceed 50%). If the end-goal of our testing is to make a "go" or "no go" decision on system, the more detailed our performance requirements are, the better.

How can I determine performance requirements? Maybe not surprisingly, the source(s) for this information should be very much the same as what we discussed for determining use cases and user concurrency. The various stakeholders (product management, marketing, business analysts, etc.) hopefully have this information documented somewhere. There may be contractual Service Level Agreements in place between your company and a customer, or between teams within your organization. Hunt them down (both the other teams and the SLAs). Or this information might just be stuffed in the back recesses of some stakeholder's brain. As you might have guessed by now, one of the things I hope to have achieved with this article is facilitated communications between the performance test teams and other groups in the organization - something I notice isn't happening in far too many companies.

And similar to what we've discussed earlier, if performance requirements are not easily available and you're hoping to test beyond a baseline, use common sense. What do YOU think is an acceptable wait time before a web page returns?

There are many studies you can find on the internet which discuss acceptable wait times but I'm not sure these are always valid. Plus they seem to change too quickly. It wasn't too long ago that an 8-second response time was the "cut-off" point between good and bad response time. Waiting 8 seconds now seems excessively long... except perhaps if you are using a mobile device. But my point is that it's all subjective and you should determine requirements specific to YOUR application and YOUR user community.

I may not have provided all the answers to the "where do I start?" question here. But hopefully this discussion has given you some clues as to the information you should gather before you begin your load testing project. Ideally you will now have a better sense of where to get some of this information and what some of the thought processes are to fill in any missing pieces on your own.

More Stories By Steve Weisfeldt

Steve Weisfeldt is a Senior Performance Engineer at Neotys, a provider of load testing software for Web applications. Previously, he has worked as the President of Engine 1 Consulting, a services firm specializing in all facets of test automation. Prior to his involvement at Engine 1 Consulting, he was a Senior Systems Engineer at Aternity. Prior to that, Steve spent seven years at automated testing vendor Segue Software (acquired by Borland). While spending most of his time at Segue delivering professional services and training, he was also involved in pre-sales and product marketing efforts.

Being in the load and performance testing space since 1999, Steve has been involved in load and performance testing projects of all sizes, in industries that span the retail, financial services, insurance and manufacturing sectors. His expertise lies in enabling organizations to optimize their ability to develop, test and launch high-quality applications efficiently, on-time and on-budget. Steve graduated from the University of Massachusetts-Lowell with a BS in Electrical Engineering and an MS in Computer Engineering.

@MicroservicesExpo Stories
"This all sounds great. But it's just not realistic." This is what a group of five senior IT executives told me during a workshop I held not long ago. We were working through an exercise on the organizational characteristics necessary to successfully execute a digital transformation, and the group was doing their ‘readout.' The executives loved everything we discussed and agreed that if such an environment existed, it would make transformation much easier. They just didn't believe it was reali...
The cloud revolution in enterprises has very clearly crossed the phase of proof-of-concepts into a truly mainstream adoption. One of most popular enterprise-wide initiatives currently going on are “cloud migration” programs of some kind or another. Finding business value for these programs is not hard to fathom – they include hyperelasticity in infrastructure consumption, subscription based models, and agility derived from rapid speed of deployment of applications. These factors will continue to...
Enterprises are adopting Kubernetes to accelerate the development and the delivery of cloud-native applications. However, sharing a Kubernetes cluster between members of the same team can be challenging. And, sharing clusters across multiple teams is even harder. Kubernetes offers several constructs to help implement segmentation and isolation. However, these primitives can be complex to understand and apply. As a result, it’s becoming common for enterprises to end up with several clusters. Thi...
"Opsani helps the enterprise adopt containers, help them move their infrastructure into this modern world of DevOps, accelerate the delivery of new features into production, and really get them going on the container path," explained Ross Schibler, CEO of Opsani, and Peter Nickolov, CTO of Opsani, in this SYS-CON.tv interview at DevOps Summit at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"We're developing a software that is based on the cloud environment and we are providing those services to corporations and the general public," explained Seungmin Kim, CEO/CTO of SM Systems Inc., in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Codigm is based on the cloud and we are here to explore marketing opportunities in America. Our mission is to make an ecosystem of the SW environment that anyone can understand, learn, teach, and develop the SW on the cloud," explained Sung Tae Ryu, CEO of Codigm, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"CA has been doing a lot of things in the area of DevOps. Now we have a complete set of tool sets in order to enable customers to go all the way from planning to development to testing down to release into the operations," explained Aruna Ravichandran, Vice President of Global Marketing and Strategy at CA Technologies, in this SYS-CON.tv interview at DevOps Summit at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
The nature of test environments is inherently temporary—you set up an environment, run through an automated test suite, and then tear down the environment. If you can reduce the cycle time for this process down to hours or minutes, then you may be able to cut your test environment budgets considerably. The impact of cloud adoption on test environments is a valuable advancement in both cost savings and agility. The on-demand model takes advantage of public cloud APIs requiring only payment for t...
Cavirin Systems has just announced C2, a SaaS offering designed to bring continuous security assessment and remediation to hybrid environments, containers, and data centers. Cavirin C2 is deployed within Amazon Web Services (AWS) and features a flexible licensing model for easy scalability and clear pay-as-you-go pricing. Although native to AWS, it also supports assessment and remediation of virtual or container instances within Microsoft Azure, Google Cloud Platform (GCP), or on-premise. By dr...
Let's do a visualization exercise. Imagine it's December 31, 2018, and you're ringing in the New Year with your friends and family. You think back on everything that you accomplished in the last year: your company's revenue is through the roof thanks to the success of your product, and you were promoted to Lead Developer. 2019 is poised to be an even bigger year for your company because you have the tools and insight to scale as quickly as demand requires. You're a happy human, and it's not just...
Many enterprise and government IT organizations are realizing the benefits of cloud computing by extending IT delivery and management processes across private and public cloud services. But they are often challenged with balancing the need for centralized cloud governance without stifling user-driven innovation. This strategy requires an approach that fundamentally reshapes how IT is delivered today, shifting the focus from infrastructure to services aggregation, and mixing and matching the bes...
identify the sources of event storms and performance anomalies will require automated, real-time root-cause analysis. I think Enterprise Management Associates said it well: “The data and metrics collected at instrumentation points across the application ecosystem are essential to performance monitoring and root cause analysis. However, analytics capable of transforming data and metrics into an application-focused report or dashboards are what separates actual application monitoring from relat...
The benefits of automation are well documented; it increases productivity, cuts cost and minimizes errors. It eliminates repetitive manual tasks, freeing us up to be more innovative. By that logic, surely, we should automate everything possible, right? So, is attempting to automate everything a sensible - even feasible - goal? In a word: no. Consider this your short guide as to what to automate and what not to automate.
DevOps teams have more on their plate than ever. As infrastructure needs grow, so does the time required to ensure that everything's running smoothly. This makes automation crucial - especially in the server and network monitoring world. Server monitoring tools can save teams time by automating server management and providing real-time performance updates. As budgets reset for the New Year, there is no better time to implement a new server monitoring tool (or re-evaluate your current solution)....
While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, discussed how data centers of the future will be managed, how the p...
We just came off of a review of a product that handles both containers and virtual machines in the same interface. Under the covers, implementation of containers defaults to LXC, though recently Docker support was added. When reading online, or searching for information, increasingly we see “Container Management” products listed as competitors to Docker, when in reality things like Rocket, LXC/LXD, and Virtualization are Dockers competitors. After doing some looking around, we have decided tha...
High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, discussed how by using ne...
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
While we understand Agile as a means to accelerate innovation, manage uncertainty and cope with ambiguity, many are inclined to think that it conflicts with the objectives of traditional engineering projects, such as building a highway, skyscraper or power plant. These are plan-driven and predictive projects that seek to avoid any uncertainty. This type of thinking, however, is short-sighted. Agile approaches are valuable in controlling uncertainty because they constrain the complexity that ste...
Digital transformation has changed the way users interact with the world, and the traditional healthcare experience no longer meets rising consumer expectations. Enterprise Health Clouds (EHCs) are designed to easily and securely deliver the smart and engaging digital health experience that patients expect today, while ensuring the compliance and data integration that care providers require. Jikku Venkat