Stress testing applications is like putting a car through crash tests, wear and tear tests, and performance tests. It’s about finding the leaks, and bottlenecks before they become a limitation to growth. In fact, stress testing is a big part of capacity planning.
There are a few different ways to stress test a web application. You can start at the database side of the house itself, and just stress test the queries your application uses. There are benchmarking tools included with MySQL such as mysqlslap which allow you to run a query or sets of queries repeated times against the database. You can also run them in parallel and in large batches together. All of these methods are an effort to push the limit and find out when the server can handle no more.
There are tools that operate by firing off repeated url requests to the webserver like httperf and also jmeter. These can be good for hammering away at the server, but if you want to do more complex and nuanced tests a like Selenium will allow you to record a web browsing session and play it back to the server, many times or in parallel again to simulate a greater load on the servers.