INTRODUCTION
Client Side Performance Testing Tools from Paros allow you to easily analyze the performance of a web site from your perspective Web surfers. Stress tests and load tests can be performed on your site quickly and reliably thanks to our wide range of free tools. Paros runs in the browser on Windows, Mac OS X and Linux and is used by over 22,000 companies around the world. It includes a powerful API, allowing it to be controlled conveniently through scripting or programatically.
Web performance is one of the most important issues in the industry today. This event will discuss how to use client side performance testing techniques during development to deliver a fast loading web site. The session will feature a live demonstration and discuss the various options available to do client side performance testing. The attendees will leave with a full understanding of what is required to get 100% coverage using Client Side Testing Tools.
WHAT IS CLIENT SIDR PERFOR,ANCE TESTING
You can conduct performance testing to ensure that the software is working properly. Software performance testing is divided into two distinct categories.
- Client-side Testing: The scope of client-side testing is to evaluate end-to-end scenarios while evaluating the rendering of elements such as CSS and JavaScript files.
- Server-side Testing: The scope of server-side testing is to evaluate logical scenarios, focus on the application behavior under user load, and check the server response time.
In both of these testings, experiments are run to check the performance of the website. These tests check the application for bottlenecks, review the time it takes to load under different speeds, and analyze its loading speed, stability, and scalability.
In the instance of conducting client-side performance testing, what we are checking is:
- How fast and efficient the application is.
- The response time of a web application if the user is using the website for the first time and when they revisit the website the second time.
- The time it takes to render web page elements to the users.
- The time it takes for the user to interact with the first web element and the average time to display the web content.
The Objective of Client-Side Performance Testing
The objective of client-side performance testing, or any performance testing, is to ascertain, evaluate, and make necessary changes in the problem areas.
For optimal results on your client-side performance testing, you can:
- Compress the images and the JS (JavaScript) code.
- Provide faster response times, enable better cache techniques. JS code caching reduces the start-up time of websites.
- Ensure implementation of necessary changes after evaluating the results of server-side performance testing.
- Minimize HTML, CSS (Cascading Style Sheets), and JavaScript content.
- Remove all unused CSS and JavaScript codes.
- Upgrade the server hardware to create more memory space, if needed.
To study, analyze, and make necessary changes in the application, software engineers use metrics to study the key performance indicators to form a conclusion.
Metric Performance Testing
Metrics define the performance of an application by estimating the health, quality, and productivity of the software. A metric establishes the quality of the performance in quantitative terms. Studying metrics can help software engineers and web developers in the following areas:
- It assists in understanding how much improvement is required and where it is required.
- It helps with the early detection of problems within an application or website.
- It is a determiner to check the progress of the development.
- They provide critical insights about application/ software behavior.
- It is a measure of quality assurance and is easy to discuss and improve upon due to its quantitative nature.
- It also helps developers make important decisions, such as estimating the cost of a project and scheduling a future project.
- It evaluates whether the current technology needs any modifications.
Types of Software Testing Metrics
- Process Metrics: This metric defines the characteristics and execution and is essential for improving the software development life cycle.
- Product Metrics: It defines a product’s performance, design, quality, and complexity to tackle its quality.
- Project Metrics: It measuresthe overall quality of a project. It calculates the team’s performance, calculates the project’s costs and defects, and estimates the deliverables.
Client-side Metrics in Performance Testing
Client-side metrics in performance testing test the application’s response for different clients using different platforms such as desktop, mobile, smart TV, etc. Client-side metrics check interaction speed, location, and connection speed.
Important Client-side Metrics in Performance Testing
- Time to First Byte (TTFB)
Time to First Byte is a client-side metric that measures the time spent connecting with the server and downloading the site’s contents. The acceptable range of TTFB is between 100-500ms (milliseconds), with anything being under 100ms is even better.
The unacceptable range of TTFB is anything more than 500ms. Developers can improve upon this by reducing HTTP requests, optimize the application code and database queries, and use a content delivery network.
- CPU Idle Time
CPU Idle Time metric measures the amount of time the CPU was not busy and was waiting for a response from the third party.
- Payload
In web development, the word ‘payload’ refers to the difference between essential information in a chunk of data and the information used to support it. In the context of malware, ‘payload’ refers to the transmission of malicious code via worms, phishing emails, and other mechanisms.
- Time to Interact
Time to Interact or TTI metric measures the time it takes for a website to become fully interactive. A fully interactive page displays useful content and is responsive to user interaction within 50 milliseconds. The acceptable range of the TTI metric is between 0 and 7.3 milliseconds. Between 0-4 milliseconds, it is fast, and between 4.1-7.3 milliseconds is moderate.
The unacceptable range of the TTI metric is anything above 7.3 milliseconds which is considered slow. Some ways to improve the TTI score are reducing payloads with code splitting, decreasing JavaScript, lowering main thread work, and optimizing third-party JavaScript.
- Speed Index
The Speed Index metric calculates the time it takes for the contents of a page to become visibly populated. They are measured in milliseconds, and the lower the score, the faster is the loading performance.
- Load Time
The Load time metric measures the time it takes for a page to appear on your screen. It is calculated from the time you click on a link to when it finishes loading to completion. It is crucial because it determines search engine ranking and increases customer satisfaction.
You can reduce the load time by minimizing the file size, combining HTML, CSS, and JavaScript files, choosing the most appropriate hosting option, and enabling browser caching.
The acceptable range of load time is a contentious subject, with users wanting the optimal time to be 3 seconds, while the average load time is 15 seconds.
- Time to Render
This metric calculates its time to process and display elements to the users.
client side performance is an important part of system optimization. Every web developer should be aware of typical performance issues and stick to the best practices during his work. With basic knowledge and a bit of attention to performance, performance bottlenecks can be avoided.
Also it is important to see the overall picture. For this, tone should run comprehensive performance tests on the client side. For both cases (debugging of the specific page or overall result for the system) there are specific tools. Let`s have a closer look at each type of tool.
See also: Test Automation: Hopes and Fears.
Debugging
To find out where page performance should be improved we can use tools that provide detailed page loading statistics. These tools can be both desktop and online.
dynaTrace
DynaTrace is a powerful tool for profiling page load. It records all activities which occur during the load and gives comprehensive reports. The collected data includes information about all sub requests, information on internal timings values (full page loading, DOM model loading, rendering of the page and so on), execution time for each JS-function and much more. DynaTrace is a desktop application. Talking about drawbacks, the tool works only with IE browsers as it operates via a plugin and works only in the Windows environment. Despite this minor inconvenience, I think this tool is a “must have” for every web developer.
Browser`s plugins
Everyone knows FireBug for FireFox browser. But not everyone use it for performance testing purposes. The “Net” tab within the plugin provides the ability to analyze the statistic of each activity taking place within the browser. Adding “NetExport” plugin allows to export all recorded data to HAR format for further investigations.
There are two other similar plugins: PageSpeed from Google and YSlow from Yahoo. Both tools provide reports about the general performance of a page and hints for improvement. Another tool – online service GTmetrix – helps to leverage all the plugins mentioned above. You just enter the URL of a webpage and promptly receive summary report.
Another useful tool is Google Chrome Speed Tracer. It is an extension for Google Chrome which offers a deep insight into what the browser is doing. Among its features are resources loading, JavaScript execution, CSS selector matching, paint processes and garbage collection.
It should be noted that almost all browsers have the ability to collect performance metrics out of the box: Opera (Opera Dragonfly), Chrome (Developers tools) and even IE (Developers tools).
WebPageTest
WebPageTest is an open source project supported by Google. The platform is under active development on GitHub. The tool is aimed at specific page performances analysis. It gathers data when the page is loaded in various types of browsers with different settings. Also it is possible to compare the page loading speed of different pages. There are a lot of other interesting and useful features, so it is worth checking out.
Statistical Performance
Many external factors affect performance metrics such as server load, network latency, client load, type of a browser and so on. Therefore the tests should always be run in series. In case of server side testing we have a variety of tools (Visual Studio, JMeter, WAPT and more). For client side performance testing the choice is much more limited.
We have to answer following questions in order to assess client-side performance:
- How to collect performance metric from browsers manually?
- How to programmatically simulate the way regular users interact with a web application?
First, we have to know how to collect performance metrics from browsers without any extra tools which could affect the metrics. The solution was given by W3C consortium in 2010. All current browsers support navigation timing – a feature which provides access to trace information while page is loaded into browser (start and end of navigation, DNS lookup, connection to server, loading and building DOM model, etc.).
What about interactions with a browser? The most convenient solution is the Selenium Web Driver library which interacts with a browser like a regular user and collects performance metrics via JavaScript queries.
At the final stage, we have to create a framework that will launch Selenium in the required browsers with the desired settings which will allow us to gather the data we are looking for.
Summary
Server side performance testing of the doesn’t provide a complete picture. The client side is of paramount importance as it assesses end-user experience. Therefore, developers should care about client-side performance and never leave it off-screen.
Conclusion
Customer satisfaction is vital when it comes to your website. Performance testing is useful for checking the usability of your website. Client-side metrics in performance testing are tools that help you in this context.
Sampled performance testing tools for Web developers to: Monitor perf metrics and uptime statistics for their development and production environments. Test their applications based on the selected perf metrics within the development environment, including local host & remote servers, on their desktop or laptops.