Testing Your Solution

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Testing your code is a fundamental part of building an Office solution. Thorough testing will save you lots of headaches later on.

In general, you probably find that you test code as you go, to make sure that each part of the solution works as expected before you move on to the next part. It's also a good idea to test the solution thoroughly once you're done building it, to find things that you missed and to try new or unexpected scenarios. If you have access to other computers, test your solution there to make sure that it behaves as expected on different system configurations.

Once you've tested the solution yourself, get someone else to test it as well. Ideally, you would recruit another developer or a professional tester, but if that's not an option, have your customers begin testing the application.

Before you deploy your solution to all users, choose a subset of users to act as beta testers. Have them keep track of all the bugs they encounter — how they caused the bug, what they expected the solution to do, and what it actually did. You can log run-time errors from within the solution, either in a text file on the users' computers, or to a centrally located database.

Finally, when you're designing your solution, prepare for the worst, and hope for the best! Consider how you will deal with a serious bug should one be discovered after you've fully deployed your solution. If your solution includes a file that may need to be modified for a bug fix — say an .mdb file that is the front end for a database solution — you have little choice but to distribute a new version of that file to all users in order to fix the bug. If your solution is Web-based, however, you may be able to fix the bug in the Web page on the Web server; the next time a user accesses that Web page, the user will see the new version containing the bug fix.