# rfremoteserver

> Robot Framework remote server written in Node.js

Latest version **0.0.5** (published 2013-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install rfremoteserver
pnpm add rfremoteserver
yarn add rfremoteserver
bun add rfremoteserver
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2013-10-27 |
| First published | 2013-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Bulkan Evcimen |
| Maintainers | bulkan |
| Keywords | testing, robot framework, remote server, keyword driven, atdd, bdd |

## Links

- npm: https://www.npmjs.com/package/rfremoteserver
- Repository: https://github.com/bulkan/rfremoteserver
- Issues: https://github.com/bulkan/rfremoteserver/issues
- npm.io page: https://npm.io/package/rfremoteserver

## Dependencies (2)

- [xmlrpc](https://npm.io/package/xmlrpc.md) ~1.1.0
- [winston](https://npm.io/package/winston.md) ~0.7.2

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2013-10-27
- 0.0.4 — 2013-09-14
- 0.0.3 — 2013-09-14
- 0.0.2 — 2013-09-07
- 0.0.1 — 2013-09-05

## README

[![Build Status](https://travis-ci.org/bulkan/rfremoteserver.png?branch=master)](https://travis-ci.org/bulkan/rfremoteserver)

rfremoteserver
===============

[![NPM](https://nodei.co/npm/rfremoteserver.png)](https://nodei.co/npm/rfremoteserver/) [![NPM](https://nodei.co/npm-dl/rfremoteserver.png?months=6)](https://nodei.co/npm/rfremoteserver/)

[Robot Framework](http://robotframework.googlecode.com/hg/) Remote Server written in Node.js, loosely based on https://github.com/mkorpela/RoboZombie and https://github.com/comick/node-robotremoteserver

Installation
============

`npm install rfremoteserver`


Usage
=====

Create a Object like the following and pass it to an instance of RemoteServer. 

```javascript
var RemoteServer = require('rfremoteserver');

var SimpleKeywordLibrary = {
  get_files_in_directory: {
    docs: "returns files in a directory",
    args: ["dir"],
    impl: function(params, callback){
      var self = this;
      var ret = {}
      fs.readdir('.', function(err, files){
        ret.return = err || files;
        if (err) return self.fail(ret, callback);
        return RemoteServer.pass(ret, callback)
      });
    }
  }
};

var server = new RemoteServer({host: "localhost", port: 8270}, [SimpleKeywordLibrary]);
server.start_remote_server();
```



In the above example, the library is just a JavaScript object with each property being another JavaScript object. These properties are the keywords. 
They are also Objects and need to have three properties. 

* `docs`: String contain the keyword documentation
* `args`: Array of the arguments that keyword accepts. use ["\*args"] if your keyword accepts more than one argument.
* `impl`: The actual keyword function. This function is what gets bound as an xmlrpc method callback hence its args are always `params` & `callback`. This function will need to call the callback function with an object that contains the following properties

        { 
          return: 'a return falue',
          status: 'PASS',    // or FAIL
          output: 'stdout'
        }

  There is two helper functions on RemoteServer `pass` and `fail` that set the `status` property

RemoteServer instance option Object should contain the following properties

* host    : hostname
* port    : port number to start listening on
* timeout : the amount of time before the server forcibly timesout the keyword

Example test case file for Robot Framework to use the above remote keyword library

```
*** Variables ***
${PORT}    8270


*** Settings ***
Library    Remote    http://localhost:${PORT}

*** Test Cases ***

Test Keyword
    ${ret}=   File Should Exist  ${CURDIR}  testcases.txt
    Should Contain   ${files}  test
```

---
_Source: https://npm.io/package/rfremoteserver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
