robotframework-sshtunnellibrary 1.0.0

Creator: railscoder56

Last updated:

0 purchases

robotframework-sshtunnellibrary 1.0.0 Image
robotframework-sshtunnellibrary 1.0.0 Images

Languages

Categories

Add to Cart

Description:

robotframeworksshtunnellibrary 1.0.0

# robotframework-sshtunnellibrary

SSHTunnelLibrary is a Robotframework library to support SSHTunnels. It will help to connect to remote host using SSH Local Forwarding.

## Usage
Install robotframework-sshtunnellibrary and its dependencies via pip

```
pip install -U sshtunnel
pip install -U robotframework-sshtunnellibrary
```

## Example

SSH Tunnel Library can be used with libraries like SSHLibrary, RequestLibrary, DatabaseLibrary, SeleniumLibrary to make connection to ssh, rest api, database connection, web application respectively.

Here is an example to make SSH connection using request library via SSH Server.

``` robotframework
*** Settings ***
Library SSHTunnelLibrary
Library SSHLibrary

*** Variables ***
REMOTEHOST=<RemoteIP/Name>{REMOTE_PORT}= 22
SSHSERVER=<SSHServerIP/Name>{SSH_SERVER_PORT}= 22
SSHSERVERUSERNAME=<SSHServerUsername>{SSH_SERVER_PASSWORD}= <SSH_Server_Password>LOCALHOST=localhost{LOCAL_PORT}= 0

REMOTEUSERNAME=<RemotehostUsername>{REMOTE_PASSWORD}= <Remote_host_Password>
*** Test Cases ***
SSH Connection using SSH Tunnel
# Create Tunnel
Start SSH Tunnel MySshTunnel REMOTEHOST{REMOTE_PORT} SSHSERVER{SSH_SERVER_PORT} SSHSERVERUSERNAME{SSH_SERVER_PASSWORD} LOCALHOST{LOCAL_PORT}
You can't use 'macro parameter character #' in math modeYou can't use 'macro parameter character #' in math mode{LOCAL_HOST} port=LOCALBINDPORTLogin{REMOTE_USERNAME} ${REMOTE_PASSWORD}

# Closing the Tunnel
Stop SSH Tunnel MySshTunnel
```

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.