Printer FriendlyEmail Article Link

Spirent TestCenter: How to config "IUT CONNECTION" if DUT doesn’t have Username or Password in conformance test (CTS)

Answer

In procedure ConnectToIut, find below line:

set logInCmds [list "$LoginPrompt" "$Login" "$PasswordPrompt" "$Password" "$evalPrompt" ""]

Remove the elements DUT doesn’t have from the list

 
  • Example:
    • set logInCmds [list "$evalPrompt" "enable" "$evalPrompt" ""]
    •  
  • Also If it looks like the prompt doesn't apper in the telnet window, may need to add exp_send "\r" after the telnet command.
    • Example1:
      • exp_spawn telnet $IutAddress
      • exp_send "\r"
      • exp_send "\r" (might need 2nd return)
    • Example2:
      • If example 1 doesn't work put an exp_send "\r" just before the last bracket. See highlighted entry below.
      •     set logInCmds [list "$LoginPrompt" "" "$PasswordPrompt" "" "$evalPrompt" ""]
            exp_spawn telnet $IutAddress 2006

            foreach {output input} $logInCmds {
                expect {
                    -re $output {
                        append expectRetValue $expect_out(buffer)
                        if {$input != ""} {
                            exp_send "$input\r"
                            after $sndCmdDelay
                        }
                    }
                    -re {(.+)} {
                        append expectRetValue $expect_out(buffer)
                        exp_continue
                    }
                    timeout { 
                        LogInfo "$output not received from IUT"
                        return -1
                    }
                }
                            exp_send "$input\r"
            }

          

Product : Spirent TestCenter,Automation,CTS,API