I think as long as your software gets sales and has a steady income, it's probably good and stable enough to any buyer's eyes. No need to develop a hardcore test framework yet.
I wouldn't worry too much about how sellable the code is for now, just develop the software to suit the needs of it's users.
At the end of the day it's about kick ass software that sells like hotcakes, that's what business buyers would be looking for.
For me I personally haven't worried to much about testing yet.
My original plan was to market out the idea and offer beta signups etc, and when that was done start development. But however I managed to find a group of potential customers who are willing to help me grow my software before I start publicly selling it.
This lead to me developing a barebone version of my idea and they've been using it for a few months now. Just waiting til the end of the year to hear the results. Can't wait to hear what features I should add and what I should remove etc.
Best of luck!