Test Cases - Using object files
Using object files
Saves a source file, giving it the .t extension; the source file is an ASCII
text file, which you can edit
Saves an object file, giving it the .to extension; the object file is a binary
file that is executable, but not readable by you
Example If you name a script file mytests and save it, you will end up with
two files: the source file mytests.t, in the location you specify, and the object
Procedure To save a new version of a script's object file when the script file
is in view-only mode, select File/Save Object File.
About object files
Object files are described in the next section.
Using object files
In order for SilkTest to run a script or include file that is in source form, it
must compile it, which can be time-consuming. Object files, on the other
hand, are ready to run.
SilkTest can read and write object files for scripts and include files. When
you save a script or include file, a source file and an object file are saved.
Object files are not platform-specific; you can use them on all platforms that
SilkTest supports. The object file for a script is saved with a .to extension, for
an include file with a .ino extension.
Advantages of object
Object files have these advantages:
Because object files are ready to run, they don't need to be recompiled if
the source file hasn't changed. This can save you a lot of time. If your
object file is more recent than your source file, the source file does not
need to be recompiled each time the file is first opened in a session; the
object file is used as is.
You can distribute object files without having to distribute the source
equivalents. So if you have built some tests (and include files) that you
want to distribute but don't want others to see the sources, you can
distribute only the object files.
Since an object file cannot be run directly, you need to define the code
you want to "hide" in an include file, which will be compiled into a .ino
object file, and then call those functions from an ordinary script file. You
then distribute the .t script file and the compiled .ino include file. Users
can open and run the script file as usual, through File/Run.