cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
93
Views
0
Helpful
0
Replies

NSO Test Case Automation Using Robot Framework

Harini-Manohar
Level 1
Level 1

Hi Team,

I'm currently automating NSO CLI test cases using Robot Framework with the SSHLibrary. I’ve encountered a strange issue when trying to execute service-related show commands via automation, while the same commands work perfectly fine when executed manually in the NSO CLI.

Setup:

  • NSO Version: 6.4.4
  • Access Method: SSH (using Robot Framework + SSHLibrary)
  • CLI Mode: Config mode
  • Test Case Snippet:
    Write    config
    Read Until Regexp    .*\\(config\\)#

    ${output}=    Write    show full-configuration services cin_base_ntp
    ${prompt}=    Read Until Regexp    .*\\(config\\)#
    Log To Console    ${output}
  • Observations:

    • show full-configuration → Works fine.
    • show full-configuration services → Also works.
    • show full-configuration services cin_base_ntp → Fails with:

    syntax error: element not found

    However, when I run the exact same command manually on the NSO CLI (after entering config mode), it works as expected and shows the correct output.
    Similar issues comes when i try to execute the command "services cin_base_ntp <device-name>" inside config mode. Landing up in syntax error

  • Debugging Done:

    • Verified that the cin_base_ntp service exists.
    • It is entering into config mode
    • Tested adding delays, prompt handling, and different prompt regex.

       

      Wondering, if this could be related to how NSO parses complex commands sent via SSH scripting tools?
      Any best practices for sending service-related CLI commands (especially under config mode, with devices, services having special characters) using Robot Framework?
      Any guidance or workaround would be highly appreciated.

      Thanks,
      Harini Manohar

0 Replies 0