question

GregM avatar image
GregM asked GregM posted

FAQ: What if a recorded manual session won't replay

This can be due to an unexpected prompt, a command generates no response, or the response includes an unexpected terminator.

 

Try the following:

 

  • Make sure the prompt received is covered by one of those in listed in your session profile Prompts (More: Terminal>Prompts), or
  • Check the Completion attribute of the Step Properties (Telnet Step Defaults> Completion) of the hanging step.  In the case of no response, uncheck "Wait for first character before starting idle" and select "Idle" for the Completion Criteria.

 

If these don't help, use Wireshark to capture packets from a manual session.  Use right-hand-mouse click "Follow TCP Stream" "Hex Dump" on one of the responses from your device to view the full conversation.

iTest
10 |950

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

1 Answer

KumarS avatar image
KumarS answered KumarS posted

In most cases though, the device always responds with at least the "prompt". So if the testcase is hung on a telnet, ssh or cmd step, it is most likely that prompt provided by the device is not in the prompt list for the session or prompt list for the step.

 

Only place where I have seen the requirement for "idle" completion rule is where the step is connecting to a terminal server ("open" step to a terminal server). In these cases, one has to hit return to get a prompt. Greg's second option is the fix for these cases.

 

In some cases, the device has a faulty implementation and sends a newline after the prompt. In these cases, you should change the completion criteria for your session or step to find prompt at "Last non-empty line".

 

Here are three cases:

 

MyRouter> add route 1.1.1.1 netmask 255.255.0.0 gw 2.2.2.2
MyRouter>

 In this caase the response is empty - but there is a prompt.

 

 

MyRouter> configure date
Enter date:
1/1/1991

 In this case (I cannot show it here), the cursor is on the third line. So if you look at the prompt on the last line, it will be empty string and will not match "Enter date:". So you have to tell iTest that look for prompt on the last non-empty line. A better implementation of the above mentioned command will leave cursor on the same line as "Enter date:". There are some buggy devices out there which will leave cursor on a newline after the prompt. Again the same solution applies in this case.

 

The last case is for terminal server. In this case,on open step, the device will send nothing back. So prompt will not match. So you have to provide a completion rule which tells iTest to consider the step complete after some "idle" time. This rule should only be for the specific step which produces no response.

 

<--- imagine that when you connect to the device on terminal server, you get nothing in your telnet session. Then you hit enter and you get the login prompt --->
login: foo
password: ****
User foo logged in on tty1
MyRouter>

 

 

 

 

 

 

 

 

 

 

 

Message Edited by KumarS on 09-05-2008 01:18 PM
10 |950

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