Description
Site stress testing tools have a lot, ab,jmeter and so on. But when you really test your system, especially dynamic systems, such as OA systems, those tools don't seem to be making it any worse. (Maybe I'm not deep on it).
The problems faced:
1, users need to login
2, according to the user's operating habits, sequential access to a series of URLs
Source:
Https://github.com/jianglibo/pressure-it
How to use:
(defn oa-user-login [cs] (let [login-url "Http://someappurl.cc/Login") (client/post login-url {:form-params {:floginverification 1 :Username "Username" :P assword " Password " :D bpath "/domcfg.nsf" :P ath_info "/index.nsf" :P ath_info_decoded "/index.nsf" : saveoptions 1 : $PublicAccess 1} : COOKIE-STORE CS})) (def oa-user-request-urls ["http://someurl.cc" "http ://someurl.cc/rndstr={{rand}} "]) (pressure-it/benchmark [oa-user-login oa-user-request-urls 20  5])
Oa-user-login is the login code, Oa-user-request-urls is by observing the user to open the page when the request background path, whether it is an IFRAME or Ajax can.
Benchmark parameters are: Login function, access URL list, number of users (number of threads), repeated several times.
You get the following report:
7361549 [nrepl-worker-19] info pressure-it.core - total time costs: 46086niluser=> (require ' [pressure-it.pressure-this :as pmy] : Reload) 7593807 [nrepl-worker-20] info pressure-it.core - thread number: 307593865 [nrepl-worker-20] info pressure-it.core - ({ "Http:///db_publicaffair.nsf/Toppic?" Openform&rndstr={{rand}} " {:request-num 150, :total-download 94734, :success {:request-num 18, :slowest 3055, :fastest 2882, :average 2997.5}, :failure {:request-num 132}}} {"http:/ Topbottomframesetwin? Openform&path=/db_mqhb.nsf&ftitle=%e6%b0%91%e6%83%85%e4%bc%9a%e5%8a%9e&rndstr={{rand}} " {:request-num 150, :total-download 0, &nbsP; :success {:request-num 0, :slowest nil, :fastest nil, :average -1}, :failure {:request-num 150}}} {"http:///db_printview.nsf/ Peopleprintview? Openagent&infoid=mqhb_info&path=app&dbname=db_mqhb.nsf " {:request-num 150,   :TOTAL-DOWNLOAD 512424,   :SUCCESS   {:REQUEST-NUM 44, :slowest 3060, :fastest 239, :average 2214.068}, :failure  {:REQUEST-NUM 106}}) 7593865 [nrepl-worker-20] info pressure-it.core - total time costs: 46266nil
As you can see, this OA is basically unusable when you have 30 concurrent users.
Todo:
In the case of a verification code, the Verification code picture must be saved on disk, and prompts the user to enter a verification code.
I wrote a tool for testing site stress with Clojure.