JMeter how to build a reliable load/stress test -
i’ve been looking resource gave idea of how create reliable load / stress test, haven’t been able find anything.
let’s want test application used sell books.
it has been proved day highest sales christmas eve (december 24th) maximum peak of 21 sales per minute. taking closer these results, determined there maximum peak of 2 sales per second it’s shown in image below.
so taking account results mentioned above, i've tried far:
load test:
number of threads: 2
ramp-up period: 1 second
loop count: forever
duration: 3600 seconds (1 hour)
stress test:
number of threads: 4 (an increase of 100%)
ramp-up period: 1 second
loop count: forever
duration: 3600 seconds (1 hour)
now know i've tried, want ask questions:
- how create load , stress test they’re reliable? things consider?
- is correct increase number of threads, keep ramp-up period invariable?
- do think it’s ok use duration of hour?
- for stress test, increased number of thread in 100%, think this? should use higher value or perhaps increase of 100% much?
thanks in advance.
uhmm, rather complex question...
i start writing down scenario, is, sequence of action supposed done user. in case, final action book buying, there more done before, browsing catalog, search, choosing title, register personal data, etc.
it can useful go deeper site statistic analysis.
once have script working, can set timer emulate user behaviour.
so go finding script take more 1 seconds. probably, in real world user spend @ least 5 minutes on site before buying book, again check these data marketing people.
let each loop take 5 minutes, gives 300 s. if want reach 1 sales/s need 300 threads there.
if start threads together, test unrealistic , pessimistic situation, 300 user buy same book @ same time. have randomize everything: searches, book list, timers, each user seems independent , different other.
once have done that, have done point 1.
2) can use rampup time control time takes launch thread. 5 threads /second safe figure in experience.
3) again depends on user modeling building: if basic script takes 5 minutes, 30-40 minutes seems save duration me, ymmv.
4) pretty depending on target test has. try clarify customer. test 60% 80% 100% , 120% of target load, each situation different. also, take in account response time target , error rate target: makes no sense go upper load if lower 1 fails target.
Comments
Post a Comment