A8 Load Testing

Due date: April 8, 2024 11:59 PM

Introduction

In this assignment, you will learn what performance test is, how to use a performance test tool, how to design a performance test, and execute performance tests.

In particular, you will load test the OpenMRS web system. By completing this assignment, you will know how to:

  • (1) Deploy the system under test
  • (2) Configure the load driver
  • (3) Execute the load test
  • (4) Analyze the results of this load test

Definition

  • Performance testing

Performance testing is a type of testing for determining the speed of a computer, network or device. It checks the performance of the components of a system by passing different parameters in different load scenarios.

  • Load testing

Load testing is the process that simulates actual user load on any application or website. It checks how the application behaves during normal and high loads. This type of testing is applied when a development project nears its completion.

Mechanism

Performance/Load testing consists of three processes: 1) designing a proper load, 2) executing a load test, and 3) analyzing the results of a load test. 

In practice, testers setup the testing environment and define the workload. Then the same requests are sent to exercise the system and the performance metrics are collected. Finally testers compare the two performance metrics and identify the performance regression. Below is a figure showing the mechanism of performance/load testing:

Tools

There exist various tools that conduct a performance/load test:

  • JMeter: JMeter is an open source tool that can be used for performance and load testing for analyzing and measuring the performance of a variety of services.
  • LoadRunner:  An enterprise performance testing version of Loadrunner and a platform enabled both global standardization.
  • ReadLine13:  is a load testing platform that brings the low cost power of the cloud to JMeter and other open source load testing tools. 
  • Locust:  Locust is an open source performance/load testing tool for HTTP and other protocols. Its developer friendly approach lets you to define your tests in regular Python code.

In this assignment, we will use JMeter for performance/load testing, and through the following sections, you will gain more hands-on knowledge and experience about performance/load testing.

JMeter - Features

JMeter is a free open source load driver from Apache foundation. JMeter is a 100% pure Java application designed to load test functional behaviour and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. It can be used to simulate a heavy load on a server, group of servers, network or object to test its strength or to analyze overall performance under different load types.

https://jmeter.apache.org/usermanual

Apache JMeter features include load and performance testing many different applications/server/protocol types:

  • Web - HTTP, HTTPS (Java, NodeJS, PHP, ASP.NET, …)
  • SOAP / REST Web Services
  • FTP
  • Database via JDBC
  • LDAP
  • Message-oriented middleware (MOM) via JMS
  • Mail - SMTP(S), POP3(S) and IMAP(S)
  • Native commands or shell scripts
  • TCP
  • Java Objects

Requirements

Please ensure you have JDK, Apache JMeter, and Psutil installed on your computer (try to install the same version).

  • Recommend operating system: OS: macOS(x86)/Windows 10/Linux

Note: The OpenMRS standalone has strict requirements on architecture and operating systems. Therefore, if you cannot install the OpenMRS standalone, you can use any installation methods to deploy the OpenMRS, such as dockers or manual install.

You can study how to install the OpenMRS from the URL below: 

Note: Only the above environment is tested by us, not sure if other versions work well.

To try and download OpenMRS: (I know it’s gonna be a pain)