Introduction: Test HotDocs Templates

Test Variables, Scripts, and Dialogs

As you create variables and computation scripts in your templates, you can test them to make sure they produce the desired result. Likewise, you can test dialogs to see how the information will be presented to users during document assembly.

As you test these different components, HotDocs displays the HotDocs test assembly window. If you find that you must edit the variable, script, or dialog, you can leave the assembly window open, bring the component editor to the front, and make the required changes. Then, to continue testing, you can click the Update button to review your changes. (Note, however, that these changes aren't saved to the component file until you click OK or Save at the component editor.)

Test Assemble Documents

At any point during template development, you can test all or part of the template to make sure it is assembling correctly. Test assembling a document can help you pinpoint trouble spots in the template without requiring you to close the template and assemble it from the library.

When you test assemble a document, HotDocs displays the same HotDocs assembly window users will see. At any time during test assembly, you can return to the template, make the desired changes, and test assemble the document again. The test assembly window will adjust to show your changes.

Use the Test Panel

To help you test, you can use the HotDocs Test Panel. This feature lets you examine variable usage, including whether variables referenced in the interview are actually used in the document (and vice versa). Features of the Test Panel also let you check to make sure you've properly asked variables and set values for variables in the template. Finally, during a test assembly, you can link from the Document Preview tab of the test assembly window back to a specific place in the template.

Resolve Problems in a Template or Script

As you test, you may find problems with your automation. For example, HotDocs may display a syntax error or warning you must fix before the template or script can be properly tested. To help you resolve syntax errors, HotDocs displays error messages that contain information about the specific error as well as a command for going to the error in the template.

Additionally, perhaps a test assembly produces a result you don't expect. To help you step through a template or script in order to determine why you're receiving unexpected results, HotDocs provides the HotDocs Debugger.