ERP Application – Load Testing
Introduction
Load testing is a crucial part of ERP application implementation or upgrade project. It is part of performance testing of the application that tries to simulate a real-world scenario. This is helpful in gauging whether the ERP application can handle designed load at peak usage. This could be simulating concurrent users, during lets say an open enrollment, or multiple users logging in to verify their pay slips. There are multiple tools out there for load testing. This article concentrates on custom tool that can be developed quickly to simulate most aspects of load testing.
Why Load Test
For an ERP application these tests are essential
* might require paid tool or creating cloud server in multiple geographies
Tech Tools
We developed a tool that is testing first 4 aspects of the application. Since the application will be accessed from a single geographical region only, multi region testing wasn’t required. Depending on the type of integrations and user base spread you should decide on these criteria
With the introduction of headless browsers like chrome, automating browser tasks is a breeze, In Google’s word
“Why is headless chrome useful?
A headless browser is a great tool for automated testing and server environments where you don't need a visible UI shell. For example, you may want to run some tests against a real web page, create a PDF of it, or just inspect how the browser renders an URL.”
Google provides a node library called Puppeteer, as the name suggests it can simulate a user accessing a browser and performing actions like entering text, checking a box, press of a button.
There are multiple options and wrapper out there but my suggestion would be to use npm as you will get tons of libraries and examples to complete the task, development time will be reduced significantly. Nodejs environment is programmer friendly and can easily run on any OS. One thing to keep in mind is to ensure your application is rendering output in HTML and not executing a JavaScript to render pages as this can change the tech tools
Recommended by LinkedIn
Writing Test Cases
A programmer doesn’t need to know ERP application functionality to write test cases. They just need to know the steps a user will take , depending on the part of application you are trying to test you might want to write down those steps
Headless browser and nodejs assist in writing all these steps and more, screenshot of code snippet below
Here we are reading a particular tag to ensure that we are able to see the login page
Here code is checking whether a particular text (browser can read text) appears anywhere on the page or not (userid A is accessing application, whether user's name appears on the Self Service page or not), take a screenshot.
Nodejs can also cause the program to wait for couple of milli secs to simulate page transition or data population on press of a button. The code will be easy to write, extend and reuse for multiple tests. A search on npm will result in multiple libraries out there using same tech but adding functionality on top of it. Pick a one that suits your requirement
You might want to look for scenarios like
Output of such a program should be generated in csv format or use libraries to generate analytics straight out of the program. Involvement of server management team will be helpful as they will be able to monitor server’s performance and rectify server failure under high load.
For simulating multiple region, either go for a paid solution or more economical – bring up cloud servers in multiple regions for a short period of time, load your programs there and execute them, concurrently or separately to measure latency, post testing dissolve the servers
Summary
Load testing will not only help the client have confidence in the architecture and setup, but will assist in gauging when they need to scale their servers. In case application is designed to handle X amount of users on a normal use and on a particular event say Open enrollment which falls one time a year for a week, you can scale your cloud infra to support that extra user base. This will ensure your application is healthy and keep the cloud infrastructure cost under control.