Testing your custom device
Testing your custom device scripts is relatively straight forward.
After you have the device type .ini file and the device script .txt file set up, you can test the new device with CatTools by setting up activities using the new device type. To test that you can access the device, SolarWinds recommends using the Device.ConnectivityTest.Login activity. Nearly all of the activities that run on a device require logging in to the device. If the Device.ConnectivityTest.Login activity fails, it is likely that the other activities also fail.
Aids to test your device
There are several testing aids available in CatTools:
1. Info Log messages
Within the Info Log pane you see messages appear while an activity is running. The level of messages that appear can be filtered by the drop-down list near the bottom of the Info Log window. Selecting level 4 Show Debug events and above
, displays any cl.log messages generated during the running of an activity. The client script function cl.Log 4,"message" is found throughout device scripts to display level 4 messages which help assist in troubleshooting device specific issues.
All Info Log messages are logged to a file called InfoLog.txt
in the CatTools root folder. This file can get very large very quickly. To purge the file, from the CatTools File Menu select File > Delete > Delete lnfolog.txt.
2. Debug log
Under the File menu of CatTools there is an entry titled Enable Capture Mode. This turns on the logging of the conversation between CatTools and the end device, creating a disk file in the \Debug sub folder of the communications.
This file can be useful when the script does not appear to be communicating correctly with the device after entering a command. The scripting mechanism waits for known prompts when issuing a command to the device, but eventually times out if an expected prompt does not appear. The debug log capture mode file shows what the device actually sent to CatTools, and you can adjust your code accordingly.