I have an invention that still needs testing before it’s ready for market. In the meantime, should I file for a patent to protect my idea?

Everything I'm about to tell you may soon be outdated, since the Patent Reform Act is being debated in the U.S. Senate. The new law would radically change the system from a “first to invent” rule (meaning in case of a dispute, the patent goes to whoever conceptualizes the idea and shows how it works first) to a "first to file" system. According to the White House, the new act would simplify the “process of acquiring rights … reduce legal costs, improve fairness” and support U.S. innovators.
Currently, since your idea is not finalized, you cannot file for a patent — but you can protect your invention until you’re ready. Keep a bound logbook that describes your initial idea, along with the date and the steps you took to develop it. There are specific rules for keeping logbooks (you can buy a logbook designed for this purpose). Consider filing a provisional patent (“patent pending”), which will protect your idea for one year. Also, be sure to check the U.S. Patent and Trademark Office (PTO) website for new developments. Link here: http://www.uspto.gov/inventors/