Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

RobotFramework library for Secure Copy file transfers (SCP) that works with the RobotFramework SSH library.

Project description

Introduction

SCPLibrary is a Robot Framework test library for performing Secure Copy (SCP) operations over SSH. Unlike the other SCPLibrary (‘robotframework-scplibrary’), this one works hand in hand with the Robot SSHLibrary (hence ‘robotframework-scpcompat’).

I wrote this because I was frustrated that the non-compatible SCPLibrary overwrote some SSHLibrary keywords and managed connections itself. I did consider changing the existing library, but that would break it for existing users.

To recap, the main differences are:

  • Relies on the standard SSHLibrary to manage connections
  • Download File and Upload File keywords use the currently active SSH connection to transfer files to the remote host
  • Does not conflict with any SSHLibrary keywords
  • Can even use an existing connection used for other SSH commands

It is operating system independent, but has only been tested with Python. Strictly speaking, the underlying ‘scp’ module is also pure Python, so let me know if you have any luck with Jython or IronPython.

SSHLibrary is open source software licensed under GNU General Public License v3.

Installation

When installing SCPLibrary on UNIX-like machines with Python, the easiest approach is using pip:

pip install robotframework-scpcompat

Note while this library supports both Python 2 and 3, SSHLibrary does not. So until SSHLibrary fixes issue #144 it doesn’t make sense to use Python 3. Hopefully though, once it’s resolved this library should also work with Python 3.

Documentation

The library is self-documenting via docstrings; additionally you can find an example robot script in this repository. You can run it against any host with SSH password authentication:

robot -v host:xxx -v user:xxx -v pass:xxx example.robot

The scp module documentation is also helpful, as this library is basically a wrapper around it.

For general information about using test libraries with Robot Framework, see Robot Framework User Guide.

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for robotframework-scpcompat, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size robotframework_scpcompat-0.1.0-py2.py3-none-any.whl (19.0 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size robotframework-scpcompat-0.1.0.tar.gz (16.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page