My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
RemoteLibrary  
A standard library providing the remote library interface
en, ja
Updated May 27, 2011

Remote library

The Remote library is one of the standard libraries but totally different than the others. It does not have any keywords of its own but it works as a proxy between Robot Framework and actual test library implementations elsewhere.

There are two main reasons for using the Remote library and the remote library interface it provides:

  • It is possible to have test libraries running on different machines than where Robot Framework itself is executed. This allows interesting possibilities for distributed testing.
  • Test libraries can be implemented using any language that supports XML-RPC protocol. There are currently generic remote servers for Python/Jython, Ruby and .NET, and generic servers for other languages like Java and Perl may be implemented in the future.

The remote library interface is described in detail in the User Guide. This wiki page just gives a very high level overview and has download links to the available remote servers and related examples.

The Remote library is available from Robot Framework 2.1 onwards.

High level architecture

The Remote library interacts with actual library implementations through remote servers, and the Remote library and servers communicate using a simple remote protocol on top of an XML-RPC channel. The high level architecture of all this is illustrated in the picture below.

Remote servers

Robot Framework currently contains remote server implementations for Python and Ruby, and the former works also with Jython. These servers, as well as example libraries and tests using them, can be downloaded here. The same servers and examples are also included in source distributions under tools/remoteserver directory.

Available remote servers

Python

The Python version of the remote server is available under this project as robotremoteserver.py. Notice that this version works also with Jython.

Ruby

The Ruby implementation of a remote server is also available as the robot_remote_server gem and developed further as a separate project on GitHub. Run the following to install it:

   gem install robot_remote_server

In your test library you will need to require robot_remote_server, which will make the RobotRemoteServer class available to your code. For more information see the instructions on the GitHub project pages.

The original version of the Ruby server is still available under this project as robotremoteserver.rb.

.NET

The .NET implementation of the remote server is available at http://code.google.com/p/sharprobotremoteserver/.

Clojure

The Clojure version is hosted on GitHub and JAR package available at http://clojars.org/robot-remote-server.

Java

Java version of the remote server is available at http://code.google.com/p/jrobotremoteserver/.

Perl

Perl version is hosted at http://code.google.com/p/plrobotremoteserver/.

Example libraries and test cases

Trying out examples

If an example library and the associated remote server are downloaded into same directory, the library can be started using one of the following commands:

   python examplelibrary.py
   jython examplelibrary.py
   ruby examplelibrary.rb

By default the libraries listen to connections to localhost on port 8270, but this can be configured like:

   python examplelibrary.py localhost 7777
   ruby examplelibrary.rb 192.1.168.0.1 8270

These examples will start the remote server so that it provides keywords implemented in the example module. After the remote server is started, the example test case file can be executed using the familiar pybot or jybot commands, possibly giving the port where the server is listening as a variable:

   pybot remote_tests.txt
   jybot --variable PORT:7777 remote_tests.txt

The results should be the same regardless of the example library or start-up script used.


Sign in to add a comment
Powered by Google Project Hosting