3

I am solving an issue that I cannot figure out. I need to login and click repeteadly (thousand of times) on the specific link to create some load. I know I should use HTTP/PHP for that but do not know how to solve the login? My next idea was to use some packet sniffer and re-send the requests..but will it work when I would close the browser? Thanks

2 Answers 2

4

If you'd want to do this from a PHP script, you could use cURL to simulate the HTTP request. However, it is easier to use a benchmark tool like ab or siege to put load on certain URLs

With ab:

ab -n 1000 -c 10 http://www.example.com/login.php

From the Siege website:

Siege is a regression test and benchmark utility. It can stress test a single URL with a user defined number of simulated users, or it can read many URLs into memory and stress them simultaneously. The program reports the total number of hits recorded, bytes transferred, response time, concurrency, and return status. Siege supports HTTP/1.0 and 1.1 protocols, GET and POST directives, cookies, transaction logging, and basic authentication. Its features are configurable on a per user basis.

Also see this related question

Sign up to request clarification or add additional context in comments.

Comments

1

Take a look at Selenium. You may record an action and then edit the resulting script into a loop.

1 Comment

Yes, but while you could use Selenium for this, it's intention is for testing frontends, while the OP seems to want to test the capacity of the server, in which case Selenium is not the right tool for the job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.