svenkatreddy / puppeteer-loadtest

load test puppeteer (Headless Chrome API) script using node
Apache License 2.0
119 stars 21 forks source link

Does this package still work? #59

Open lightninglu10 opened 3 years ago

lightninglu10 commented 3 years ago

Hey all, I'm trying to load test my site, and found this package.

It's seems to be hanging on the first step

patricklu@patricklu-macbook funnel-server % puppeteer-loadtest --s=100 --c=25 --file=loadtest.js
  puppeteer-loadtest puppeteer-loadtest is loading... +0ms

The loadtest.js works properly alone, but when trying to use puppeteer-loadtest it's just hanging here.

svenkatreddy commented 3 years ago

@lightninglu10 Yes it should be working. Can you please try with latest version ? if you still face issue, please share a short version of the script you are trying to run ?

Ebeldev commented 3 years ago

Like @lightninglu10 , my puppeteer script works on his own. But when I run puppeteer-loadtest --file=script.js --s=1 --c=2 --outputFile=performance.json, it never go further then puppeteer-loadtest puppeteer-loadtest is loading... +0ms ...

Ebeldev commented 3 years ago

With some few tweaks I was able to make my script run. The major things I remove was all the console.info I had. It did cause for the loadtest library to get stuck.

And I added some "page.waitfor(2000)" in order to lest the process finish correctly. But everything worked out.

Ebeldev commented 3 years ago

It doesn't seem to be constant unfortunatly. The loadtest works if I have 2 concurrent but if I put 5 it never finishes and I do not know where it breaks since I do not have any output of why it never finishes.

svenkatreddy commented 3 years ago

If it works for concurrency 2 and not for concurrency 5, There could be an issue with the system you are trying to test, it could be hanging on. In the next iteration, I can add an option to kill the process if it takes longer than a certain timeout so that it reports back that it took longer than expected. The purpose of this load test is to find these kinds of issues to test how well your system is going to perform in those conditions.