What is Benchmark?
A benchmark is a metric or a point of reference against which products/services can be compared to assess the quality of the product/service.
In other words, it's a set standard that helps to determine the quality of the product or service.
For example, a football team has a benchmark for a player to qualify as a premier league player. The skill set for the benchmark could be number of goals scored in last five season, or ball possession during the first half time, or minimum games played in the local tournament, etc.
In software industry, you could benchmark a software product or service to assess its quality.
What is Benchmark Testing?
Benchmark Testing is a type of testing done to give repeatable set of quantifiable result from which present and future software releases for specific functionality can be baselined or compared.
It is a process used to compare the performance of software or hardware system also known as SUT (System Under Test). An SUT can be a Web-based application.
A benchmark must be repeatable. For instance, with every iteration of load test, if the response times varies too much, system performance be benchmarked. Response time needs to be stable amongst different load conditions.
A benchmark must be quantifiable. For example, user experience cannot be quantified in numbers, but time a user spends on a webpage due to good UI can be quantified.
Benchmark Testing is not a term related to just software testing, but it also deals with Hardware Testing and considered as one of the most important tasks in the business world.
In this tutorial, we will discuss benchmark for a client-server application or in other word web application.
The benchmark testing can be done for following services,
- Browser compatibility
- Broken Links
- HTML compliance
- Load Time
- Link popularity
In this tutorial, you will learn-
At business level, benchmark testing can be helpful in determining
- How well a web-based application is performing with respect to the competitors
- How different types of customers experience the response time and availability of a site
- It ensures that websites complies with standards and best practices
- It enables to evaluate third- party service providers prior to making a contracting decision
- Allows to figure out the mistakes to be avoided
Test plan is the most crucial element of the benchmark testing process. Benchmark Test plan follows steps as given below;
- Scaling and invoking workload
- Collect and store measures for benchmark testing
- Define the time span required and the terminal point of test process
- Prepare backup plan to overcome any new test case failure
- Decide the authority to call termination of end process
Phases of Benchmark Testing
There are 4 phases involved in Benchmark Testing:
- Planning Phase
- Identifying and prioritize standards and requirements
- Decide benchmark criteria
- Define benchmark test process
- Analysis Phase
- Identify root cause of error to improve quality
- Setting goals for test process
- Integration Phase
- Share outcomes with concerned person and get approval
- Establish functional goals
- Action Phase
- Develop test plan and documentation
- Implement actions specified in previous phases and monitor progress
- Run the process continuously
Benchmark Testing Frameworks help to perform some fundamental tasks for performance check.
These fundamental tasks include;
- Database Access
- Server-side composition
- JSON Serialization
Benchmark Framework 2.0 & TechEmpower are mostly used Benchmark Testing frameworks
Let's have a look towards TechEmpower. We will have a quick glance towards its salient features
- It is an open-source framework to perform benchmark tasks
- It needs correct configuration of benchmarking environment
- There are mainly two modes such as Benchmark Mode for comparing results and Verify Mode for those who are not experts
- There are several files required which are unique and may vary system to system accordingly
- It includes 'Benchmark Config File' that defines set of test instructions and metadata for benchmark program
- Object – Relational Mapper (ORM) is used to perform tests on databases, JSON Serialization, etc.
- Consistency and control are important measures to perform benchmark testing
- Understand the system architecture to design test criteria and test data
- Examine initial static data and update according to number of users
- Check for 'Reset' functionality wherever required and define per second transaction rate (this specifically deals with users transaction against database)
- Split the system elements according to is functionalities
- Every system has different architecture and design, which needs to be taken into consideration while performing Benchmark Testing
Different systems have a varying degree of complexity and requires different techniques for testing application.
There are 3 major components of Benchmark Testing. They are
- Workload Specifications: Determining type and frequency of request that is to be submitted to the system under test.
- Specifications of Metrics: Determine which element to be measured e.g.; Download speed
- Specification of measurement: Determining how to measure the specified elements to find appropriate values
For running successful benchmark testing following facts needs to be considered.
- Make sure all software components are in working condition
- Operating system and supporting drivers should work accurately
- Remove prefetch and temporary files from the system before running benchmark
- Close all processes and applications running in background
- Check for operating systems updates and real- world configurations
Benchmark Testing Tools are being categorized accordingly. We will enlist one by one.
Tools for Testing Windows PCs:
Tools for Testing CPU performance:
Tools for Testing System's Speed and Mobile Device batteries:
1. Phoronix (Linux)
2. CPU-M (CPU Benchmark test)
3. Vellamo (Web browsing performance)
Tools for Performing Comparative Benchmark Test between different machines:
Benchmark Testing can be performed with Android phone and tablets too, some of the tools are listed above for the same. Among all Passmark is well-known and widely used Benchmark Testing tool.
- Benchmark Testing gives repeatable set of quantifiable result on performance of a system.
- Helpful to exercise load conditions and determine system behavior against DDoS attack.
- Workload specifications, specifications of metrics and specifications of measurements are major components of benchmark testing.
- Several tools and frameworks are used to perform benchmark testing rapidly and efficiently.
- Benchmark Testing is also useful for mobile devices too.
This article is contributed by Dhanashri Salvi