Have you ever shipped test code (JUnit, NUnit etc) with your application that could be runnable by the end-user ?
Basic Idea is this :
The application can be deployed in a varied environment and it is hard to gather all the possible hardware - software combination or pre-requisites for the application. It is however possible to write a test suite that assert that the application has all that it needs to perform the task at hand. Unfortunately this must be done by mocking a few components so that the test does not affect the real production environment.
There are clear benefits to shipping these tests such as :
- give the customer a means to verify the system is in order.
- provide reports to help support diagnose issues.
- provide means for implementation team to assert their setup should work
Natural way to do this would be to have a subset of tests that are actually packaged with the application (either as a separate project or as a part of each components of the whole). Even more natural would be to use the tools and techniques we already use for our own unit tests namely Unit test library, mocking framework etc.
Have you ever done this ? How have you done it ? or why do you think this is a very bad idea ?