Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336743

Summary: Load-testing and user creation scripts
Product: [ECD] Orion Reporter: Denis Roy <denis.roy>
Component: RelengAssignee: Project Inbox <orion.releng-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: enhancement    
Priority: P3 CC: ken_walker, simon_kaegi
Version: 0.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Stress Test shell script none

Description Denis Roy CLA 2011-02-09 13:22:37 EST
Created attachment 188612 [details]
Stress Test shell script

I'm attaching a script I wrote to stress-test an Orion server.  It should run unchanged on a typical Linux environment.  It expects a userlist.txt file, which contains id:password pairs, one per line.

To create random users, I use curl to log into my Orion instance as admin (this is described on the server admin guide) and use the following one-liner:

for (( c=1; c<=10000; c++ )) do a=$(./generate-rand-string.sh); b=$(./generate-rand-string.sh); echo "$a@${b}.com:abcde123" >> userlist.txt; echo "$a@${b}.com"; curl -b curl_cookies.txt -d "login=$a@{$b}.com" -d "password=abcde123" http://localhost/users; done

The above line also creates the userlist.txt file expected by the stress-test script.  generate-rand-string.sh is nothing more than a script that generates 12 bytes of random alphanumeric goodness.
Comment 1 Denis Roy CLA 2013-02-25 11:50:17 EST
Not sure why I even opened this.
Comment 2 Ken Walker CLA 2013-02-25 11:57:23 EST
I wrote something similar in Java (yeesh) to test user pagination I added to the admin page.  Just randomly made things though.