Crash test your application

ANCAP, the Australasian New Car Assessment Program, has a print advertising campaign warning motorists about the dangers of vehicles that have not passed their high standards. Crash test dummies try to escape from technicians in the ANCAP testing facility. Image courtesy: theinspirationroom.com

 

Sometime ago I wrote about a quick way to shutdown a hanged application.
But, in fact, shutting down a working application could help you exposing certain types of resource management defects. This is how ends become means.

Sample tests, suggested below, were tried on different Windows Desktop applications, sometimes helping to reveal serious issues.

Local Tests



  • Start an application. Begin working process then shutdown the application in the middle of it. Start the application. See if it reports than the previous session wasn't properly finished (and does it suggest something about it, like "start in safe mode").

  • Start an application. Begin working process then shutdown the application in the middle of it. Start the application. See if it can access any previously opened files, and how is it handling and reporting the issues.

  • Change settings in an application, apply changes. Shutdown the application. If the application saves settings only at exit point, all changes will be lost.

  • Change settings in an application, apply changes and shutdown the application simultaneously. Start the application. See if it can access configuration files, does it report that they might be corrupted, does it suggest repairing them? (you can also try corrupting the files manually).

  • If an application allows running 2 copies: open 2, then shutdown one of them. Observe behavior of the remaining one.


Server Tests



  • Start a client. Shutdown a client. Try to login as the same user: a) immediately b) after a timeout given.

  • Start a client. Shutdown a client. Repeat this process (you may want to automate that) while monitoring how Server side of an application allocates and releases (does it?) RAM and hard-drive resources.

  • Start a client. Shutdown a client. Repeat this process (you may want to automate that) for a while - you may see errors like "max number of connections exceeded", etc.


Let us know results of your exploration.