Saving and Loading Your Projects, Scripts and Options

<< Click to Display Table of Contents >>

Navigation:  Working with Docklight >

Saving and Loading Your Projects, Scripts and Options

You can specify Docklight Scripting's behavior via three different types of user configuration data:


Project Data


Program Options



Saving and Loading Project Data


The project data includes:

Send Sequences

Receive Sequences

Additional Project Settings: communication mode, COM ports used, COM port settings (baud rate, parity, ...)

Documentation contents


The project is saved in a Docklight project file (.ptp file) using the menu File > SAVE Save Project or File > Save Project As...


It is generally recommended to save your project before starting a test run.


NOTE: Saving your project only stores the project's sequences, settings, and Documentation Area data. If you want to save a log of the communication during a test run, see section logging and analyzing a test.


Loading a project is done using the File > OPEN Open Project... menu.


Saving and Loading Scripts


Docklight script code for automated testing tasks is saved in a separate file (.pts file). Use the menu Scripting > Save Script or Scripting > Save Script As...


Saving and Loading Program Options


Docklight Options (text formatting, control-character behaviors, a.s.o) can be modified by using the Docklight Options dialog (menu Tools > WRENCH Options...).


TIP: When running your script, you may want to use a specific set of Options to ensure that Docklight creates the communication and log output in a well-defined format. Use the SaveProgramOptions and LoadProgramOptions methods to create an options file and load the options at the start of your script.



Using Project and Script Pairs: _auto.pts


In most Docklight Scripting applications, a Docklight script (.pts file) requires an accompanying project (.ptp file). You can use the following naming scheme to enable automatic loading and script start:





If the two files are located in the same folder, Docklight Scripting will perform the following additional operations:


If myproject.ptp is opened (either double-click in Windows Explorer, or using menu File > OPEN Open Project...), Docklight Scripting also opens myproject_auto.pts alongside, if not already open.

If myproject_auto.pts is opened, Docklight Scripting also opens myproject.ptp alongside, if not already open.

If play Start communication is executed, the communication port is opened and the script is started.


NOTE: If myproject.ptp is opened in Docklight (non-scripting), a warning appears that this seems to be a project with script support and its use is limited in Docklight (non-scripting).


NOTE: The OpenProject and StartCommunication script methods are not affected by the _auto.pts behavior.