The best way to test your writing before actually publishing a story is to share the work with a several people you trust to give an honest opinion. A small writer’s group can be very useful in getting good objective feedback. It is important to listen carefully to the group and make changes if the comments ring true in your gut. You don’t have to accept every criticism, but it can be very useful to consider what colleagues are saying.
When you have written many drafts and finally submit to agents and publishers, you may get yet more rounds of feedback.
Whether your writing is well received by the public at large will depend on a number of factors. These can include how well the publisher promotes the title, timing, similar books that may compete for the same audience, and how well your story is crafted. A factor may also be how closely aligned the publisher is with your specific audience. In this competitive world, it is imperative that you “find your audience.” And that’s not an easy thing to do. Matching your story and your style with just the right readers requires a lot of work on both the publisher’s part and yours.
The truth is no one will really know for sure how a work is received until it is out there, not even the publisher. For the publisher, it’s a gamble, too. The readers (and the publisher) will tell you what they think, like it or not.
Meanwhile, your job is to make your story the very best it can be. And don’t be discouraged. Remember, people like JK Rowling were rejected many times before they found a home for their work.
Keep writing.