title: Is it common or even a good idea to release source code for automated tests with a closed-source app?
body: <p>Please point me to any dupes or better places to post this question that you may find.</p>
  
  <p>I have never sold software before, but when I put myself in my customers' shoes, I think, "I sure would like to see source code for automatic tests for any software that I buy.  It would serve as <em>awesomely detailed</em> documentation for the software that I'm buying!  In fact, I'd love to see the tests as proof-of-concept before I buy, if possible."  </p>
  
  <p>From the seller's perspective, I see no reason to hide the test code source (as long as the tests only access the binaries through "front doors" and contain no sensitive data), or even to release the tests as open source to receive help from anyone who wants to help us, as well as prove to potential customers what the software can do in detail.</p>
  
  <p>So... Is it customary, or even a good idea, to let users see (some) automated test code, or even release it open-source, for a closed-source application application that you are selling?</p>
  
  <p>EDIT: Thank you all for the insightful comments.  I should clarify that my goal is <em>not</em> to say "Look at how high-quality my software is!" but instead "This is how you use the software" (using tests as documentation).  This is for an API; no UI is involved.  I just want to demonstrate how to use it (public interface), not the internal workings.  I really hate demo apps that are very long, but show only the "happy path" through an API, so I was looking for a way to improve on that.</p>