Performance Testing
Earlier uPortal performance testing lessons learned
The set of performance testing scripts provided in uPortal-start is meant to provide a baseline against the Quickstart data set (plus extra users). It is not intended to be an exhaustive coverage of functionality, and as with any test of this type, it is strongly recommended to NOT run this against your production install.
One of the goals is to run this pre-release of a component (uPortal
, Announcements Portlet
, etc) and compare against the previous runs
Prepare
- Clone uPortal and setup the jwt signatures in
etc/portal/uPortal.properties
andetc/portal/notifications.properties
. This allows the notifications API to be called. - Run:
{uP-start}$ ./gradlew clean portalInit
. - Configure test user generation with the
data.test.perf.*
configs inbuild.properties
. - Generate test users:
{uP-start}$ ./gradlew perfGenTestData
. - Import the test users (Assuming you placed your perf user xml files in
data/perf
):{uP-start}$ ./gradlew dataImport -Ddir="{uP-start}/data/perf"
. - Start the portal:
{uP-start}$ ./gradlew tomcatStart
. - Test a login from the generated population csv file.
Execute
Various configurations for the have been exposed - see baseline.properties.sample
for details.
Current method is to run via a standalone JMeter:
$ sh {jmeter-install}/bin/jmeter.sh -p buildSrc/src/test/perf/{my config}.properties -t buildSrc/src/test/perf/baseline.jmx
As a proof-of-concept, you can execute the baseline scripts via Gradle. The Gradle process is noted here as a possible CI hook for running perf tests at each commit / PR in the future.
$ ./gradlew jmRun
Baseline Script
Tests are run with a cache manager, but will clear the cache each iteration.
- Ramp up from 1 to
load.num.of.threads
users inload.ramp.up
seconds - All users perform the list of modules / actions below
- Between module requests, users will take a random length break (
delay.think.time.*
) - At the end of the loop, users will take a random length break (
delay.final.think.time.*
) - Test will run for each
load.loop.count
iterations or a duration ofscheduler.duration.seconds
List of Baseline Modules
- UI - Login
- API - Gather AuthToken
- API - People search
- API - GET notifications
- API - GET layout
- UI - View Announcements
- UI - View ESUP FM - Maximized
- UI - View ESUP FM - htmlFileTreeURL
- UI - View ESUP FM - fileChildrenURL