Project.net Load Test

There is a simple load test for the project.net application. The Grinder load test utility is used to login as a user and access several project.net pages via HTTP requests. This load test is not a formal load test, rather it is intended to be a quick and simple way to stress a server. The Grinder utility supports multiple test clients reporting to one console for very heavy loads. Usually, one client with 4 processes, 1 thread each is enough load to exercise the application for developer profiling, leak detection, etc.

Summary

In general, to create and run Grinder load tests, you need to do the following.

On all clients:

  • You will need the contents of the grinder/lib directory, the .py file you are going to run, and the .properties file that is associated with that .py file.
  • It might be easier to put everything in one directory on the client.
  • Make sure your Grinder console is already started and the console has the correct name or IP address in the properties file.
  • Start the client with java -cp grinder.jar net.grinder.Grinder propertyfilename.properties

On the Grinder Console machine:

  • You will only need the contents of the grinder/lib directory
  • Start the console using java -cp grinder.jar net.grinder.Grinder

Quick Start

You can configure and run the Project.net default Grinder load test in 5 minutes. The Grinder load test scripts are located in the following project.net source directory:

\test\load-test\scripts
  1. Step One -- Edit loadTestProject.properties

In the Grinder properties file loadTestProject.properties, configure the following for your workstation and sever you want to test.

grinder.script=loadTestProject.py

grinder.consoleAddress=127.0.0.1
grinder.grinderAddress=127.0.0.1
grinder.grinderPort=6372

grinder.processes=4
grinder.threads=1
grinder.runs=100

grinder.jvm.arguments=-Dtestserver.url=localhost:8080 -Djsproot.url=/pnet/ -Duser.username=appadmin -

Duser.password=appadmin -Duser.domain=1000
  1. Step Two -- Edit loadTestProject.py

In the Grinder test script loadTestProject.py, you need to edit one line that tells the script which project ID numbers to test for your target sever. For example, if you are testing test2.project.net, you need to login to that server as the user that the load test will run under and find four project id numbers. Edit the projectList array with those project ID numbers.

NOTE: the script requires you have FOUR project IDs in the that array.

#test2 project IDs
projectList = [104047, 5085, 7300, 5604]
  1. Step three -- Start the Grinder Console

Start the Grinder Console using the command:

java -cp ..\grinder\lib\grinder.jar net.grinder.Console
  1. Step four -- Start the Grinder

Start the Grinder Client script using the command:

java -cp ..\grinder\lib\grinder.jar net.grinder.Grinder loadTestProject.properties
  1. Step Five -- Start the tests

On the Grinder Console UI, click Action-->Start Processes. Look at the "Results" tab on the Grinder Console UI and in the log files that begin with:

data_*
out_*
respons_errors2_*

Grinder Console Screens

Grinder Console Results Tab

Grinder Console Graphs tab

References

For more information on using the Grinder tool, see: http://grinder.sourceforge.net/

Attachments