User Guide : Scripting : Script Troubleshooting : Expression Tester Utility
 
Share this page             
Expression Tester Utility
The Expression Tester is a command-line utility that is available on full and Runtime Engine installations of DataConnect.
Note:  The Expression Tester must be run locally from the server where DataConnect is installed. It is not included in the Client Tools package.
Expression Tester allows you to test and debug EZscript code directly from the command line, without having to use the Script Editor in the Design Manager. This can be useful for quickly testing an expression, especially in embedding scenarios.
Using the Expression Tester
If you are developing expressions that do not depend on source or target values (or where the source and target values can be simulated), it can be faster to edit a file and run exptest. You can use the Print function within your expression (instead of the Msgbox or LogMessage functions), which speeds up the process even more. You can also use the Print function to print out the values of variables when the Expression Tester runs.
To use the Expression Tester on a Windows server
1. At the command line, navigate to the appropriate directory.
Full: C:\Actian\di-full-64bit-10.x.x\runtime\di9
Stand-alone engine: C:\Actian\di-standalone-engine-64bit-10.x.x\runtime\di9
2. Type exptest filename. The file name is the name of a text file that contains the expression you are testing. If you supply more than one text file, the Expression Tester runs the files sequentially.
3. Press Enter to execute the program. If there is a return value left on the stack, the program prints it out on the screen.
To use the Expression Tester on a Linux server
1. At the command line, go to the appropriate directory:
Full: /opt/Actian/di-full-10.x.x/runtime/di9
Stand-alone engine: /opt/Actian/di-standalone-engine-10.x.x/runtime/di9
2. Type ./exptest filename. The file name is the name of a text file that contains the expression you are testing. If you supply more than one text file, the Expression Tester runs the files sequentially.
3. Press Enter to execute the program. If there is a return value left on the stack, the program prints it out on the screen.
Using Flags
To run Expression Tester with flags, add the flags before the file name (e.g., exptest -d filename.txt).
The following flags can be used to modify how the Expression Tester runs:
Flag
Description
-d
Enable debugging. See Debugger Commands for more information about using the debugger.
-s
Syntax check only.
-o
Call CoInitializeEx (Windows only).
-p
Enable engine profiling. The engine profile will be saved as djprof.out.
-gprogfile
Execute the expression in global mode before any other files.
All user-defined functions in that program file will be global and available for use by any others.
-llogfile
Open the specified log file for all types of messages.
-wwhitelist
Specify a file containing a list of allowed third-party executables.
Debugger Commands
Use the following commands to interact with the debugger when you have activated the Expression Tester with the debugging option (-d).
Command
Description
H
Display Help text. When the debugger is active, type the character 'h' to get a list of debugger commands.
(Empty line)
Step or next, depending on last command.
S [num]
Single step 1 or NUM lines.
N [num]
Single step 1 or NUM lines overfunction calls.
M [module]
Set module for display and breakpoint commands. If MODULE is not specified, default to "current" module.
D [num1[:num2]
Display lines. With no arguments display next 10 lines.
If NUM1 is present, display 10 lines starting with line NUM1.
If NUM2 is present, display NUM2 lines starting with line NUM1.
R
Run to completion or breakpoint.
E expr
Evaluate expression EXPR.
BP [num]
Set breakpoint at current line or line NUM.
BR [num]
Remove breakpoint at current line or line NUM.
BC
Clear all breakpoints.
BL
List breakpoints.
Q
Quit execution.