An obvious solution is to hire multiple people to use real browsers to test. This is not practical. Google Chrome got a headless feature in version 59 which can be invoked from the command line on instances without a windowing subsystem. Watch this YouTube video.
On Windows 10, here’s the command that will load not only a we-retail web page but also all of its embedded resources. Note that the --disable-gpu argument is only needed for Windows, not MacOS or Linux. Verify by tailing AEM’s request.log
“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” --headless --disable-gpu http://localhost:4503/content/we-retail/us/en.html
You can now build yourself a decent and realistic load test by writing a bash shell script or a Windows PowerShell script to repeatedly load a set of web pages from a CSV file, and run this from multiple instances. Here is how to invoke [Google Chrome Headless] in PowerShell:
Start-Process ‘C:\Program Files (x86)\Google\Chrome\Application\chrome.exe’ “--headless --disable-gpu http://localhost:4503/content/we-retail/us/en.html”
A single instance can be used to generate multi-user load by simultaneously running multiple instances of PowerShell or bash. Below is a table of the results of a 4-user, 1-hour load test on the complete set of we-retail pages (399 pages). You can download the Excel spreadsheet here (note that it has multiple worksheets).
No comments:
Post a Comment
If you have any doubts or questions, please let us know.