Davidson: If possible, have at least one test environment that can be used to make sure your code works fast enough before actual production. However, that may not be possible depending on size or load. Don’t build your code, run your tests, then ship it to production on hardware that is 100 times faster than what you’ve tested on, and then get 10,000 times more load than you’ve tested with. The more you can simulate and control, the better results you’ll likely have.
Kline: Usually, a dev/test environment that is comparable to production is known as a User Acceptance Testing (UAT) environment. It is generally considered essential when the software or application in question has a degree of legal liability associated with it. But as Louis says, it’s “hella expensive.”