question

bgessaro avatar image
bgessaro asked bgessaro posted

IxTclHal Load Error using itestcli.exe with iTest GUI closed ONLY

I have an iTest test case that executes and passes perfectly using the iTest GUI as well as from the command line with the GUI open.  The test case simply opens a telnet session to a switch as well as two sessions on two IXIA ports.  The error ONLY manifests when the iTest GUI is closed and it is executed from the command line.  Are there any known issues with accessing IxTclHal from a test case from the command line with the iTest GUI closed?

 

We have lots of experience ensuring the paths are all set up correctly on the execution machine for IxTclHal, but we may have missed something specific to this particular use case... Please know this test case is able to successfully open sessions to this same IXIA with the following PATH env variables set as shown when executing from the GUI or from the command line with the GUI open, just not "headless".

 

The configuration specs are as follows:

Execution PC: Windows Vista

PC tcl location C:\tcl

TCLLIBPATH:
"C:/program files/ixia/" "C:/Program Files/Ixia/TclScripts/lib" "C:/Program Files/Ixia/IxOS/5.20-GA-Patch1" "C:/Program Files/Ixia/IxOS/5.20-GA-Patch1/TclScripts/lib"

PATH:
C:\Program Files\Ixia\IxOS\5.20-GA-Patch1; C:\Program Files\ActiveState Komodo IDE 5\;C:\Tcl\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;...etc.

 

IxExplorer connects to IXIA 300-IXIA-XM12-01external to iTest   =>  OK

PC tcl shell "% package require IxTclHal" external to iTest   => OK  (5.20)

IXIA software on PC matches IXIA 300-IXIA-XM12-01  => IxOS 5.20.400.18 GA-Patch1

itestcli Command Processor Version 3.3.1

Fanfare Command: itestcli -rw -w "C:/datastore/workspace/testware" -l "fanfare.log" -r "C:/datastore/workspace/testware/results/1239808309/ixia_example/report.html" "ixia_example.fftc"

 

Execution messages: 

 ....

Info message 1 8.1 open_tel Open telnet session on 16.93.51.148 2013

Info analysis dut_001 3.2 8.3.8 open_tel Verified device state 344-5406-03; session: dut_001_conn001

Info message 1 10.1 topoFunc Execute topoFunc_InterfaceGetAttribute_tcl on 300-IXIA-XM12-01

Info message tcl_she 5 10.5 topoFunc topoFunc_InterfaceGet successful - Interfaces on device = 1/1 1/2

Info message 8 10.8 topoFunc topoFunc_InterfaceGetAttribute_tcl execution on 300-IXIA-XM12-01 Complete

Info message 1 12.1 open_ixi Open IXIA session on 300-IXIA-XM12-01 16.93.52.202

Fail terminal testEqu 2 12.2 open_ixi Error attempting to open connection to server: Error loading TCL package IxTclHal

Fail execution testEqu 2 12.2 open_ixi Test case ixia_example has failed.

Info execution open_ixi Execution completed (1m 22s)

iTesttraffic generation
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bgessaro avatar image
bgessaro answered bgessaro posted

Yes, after reading all the related posts (IxTclHal), I had tried that already and the package loaded successfully from the commandline.  But after reading your suggestion and thinking about it, I began to wonder if the environment variables were not being interpreted the same in different environments with the different use cases.

 

One of my collegues suggested executing the following code in each of the tcl shells in the execution evnironment to see if there were differences in the way envornment variables were interpreted:

foreach var [ lsort [ array names env]] {

puts "$var = $env($var)"

}

Using your suggestion to try to require the package from the same command line environment as well as executing the above code, we were able to determine that using a tcl script to launch itestcli from within out Tcl-Eclipse IDE caused the TCLLIBPATH variable to be overwritten by the Eclipse IDE environment.  So even though it was a command line execution scenario, it was from within the Eclipse environment context.  It was just very bizarre that if we had the iTest GUI open, the system-defined TCLLIBPATH variable was used instead!

 

So thanks so much for your prompt suggestion- it helped direct us to the final solution which is to explicitly declare TCLLIBPATH both in the system environment variables as well as out Tcl-Eclipse environment from which we execute the itestcli commandline.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KumarS avatar image
KumarS answered KumarS posted

If your IXIA testcase works perfectly in the GUI, it should work without any problems in "headless" mode using itestcli as well. From your description, it seems like in headless mode, iTest code cannot load tcl package "IxTclHal".

 

Can you try one thing? On the "command shell" where you started itestcli in, can you type: "tclsh.exe" and in the shell try:  "package require IxTclHal". If this works, the execution through itestcli should also work.

 

 

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.