Skip to content

Instantly share code, notes, and snippets.

@filipesalvadorsilveira
Created November 14, 2019 13:51
Show Gist options
  • Save filipesalvadorsilveira/b68aa4de2bbcc5e63dbc1f59b9c61d19 to your computer and use it in GitHub Desktop.
Save filipesalvadorsilveira/b68aa4de2bbcc5e63dbc1f59b9c61d19 to your computer and use it in GitHub Desktop.
TestSecureShell
*** Settings ***
Documentation SSH Library Demo
Library SSHLibrary
Suite Setup Open Connection And Log In
Suite Teardown Close All Connections
*** Variables ***
${SSH_HOST} server.ssh.com
${SSH_USERNAME} user.user
${SSH_PASSWORD} 123456
${DIR} /home/user/executables/
*** Test Cases ***
Simple Test with SSH
Execute Command SSH
*** Keywords ***
Open SSH Connection And Log In
Open Connection ${SSH_HOST}
Login ${SSH_USERNAME} ${SSH_PASSWORD}
Close SSH Connection
Close Connection
Execute Command SSH
[Timeout] 59 seconds
Write ${DIR}ExecuteCommand.run
${rup_command}= Read Until Prompt
${read_output}= Read
Should Contain ${read_output} [K
Should Not Contain ${read_output} ERROR
[Teardown] Close all connections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment