Git Product home page Git Product logo

scenario-player's Introduction

Code Coverage CI Status Docker Cloud Releases License Open Bugs

Raiden Scenario Player

The Raiden Scenario Player is an integration testing tool written in Python 3. It allows testing of various scenarios, and is an integral component of the Raiden test suite.

Installation

Using git & pip:

# Clone the scenario-player repository
git clone http://github.com/raiden-network/scenario-player

# Install Raiden's dev requirements.https://github.com/raiden-network/scenario-player/pull/122
pip install -r https://raw.githubusercontent.com/raiden-network/raiden/develop/requirements/requirements-dev.txt

# Install the scenario-player.
pip install ./scenario-player

Using pip

Using a pip installation:

$ scenario_player --help
Usage: scenario_player [OPTIONS] COMMAND [ARGS]...

Options:
  --data-path DIRECTORY           [default: $HOME/.raiden/scenario-player]
  --chain <chain-name>:<eth-node-rpc-url>
                                  Chain name to eth rpc url mapping, multiple allowed
                                  [required]
  --help                          Show this message and exit.

Commands:
  pack-logs (experimental)
  reclaim-eth
  run

Using docker

Pulling an image is as simple as:

docker pull raidennetwork/scenario-player:<tag>

Where <tag> may be a specific version, git branch or latest for the last commit on dev, or stable for the last release on master.

Usage

Invoking the scenario-player from the cli can be done in one of the following ways, depending on how you installed the tool.

pip installation

Invoke the command directly on the cli:

$ scenario-player --chain=goerli:http://geth.goerli.ethnodes.brainbot.com:8545 \

    run --keystore-file=/path/to/keystore.file --password=${KEYSTORE_PW} \
    /path/to/scenario.yaml

Reclaiming spent test ether:

$ scenario-player --chain=goerli:http://geth.goerli.ethnodes.brainbot.com:8545 \
    reclaim-eth --keystore-file=/path/to/keystore.file --password=${KEYSTORE_PW}

docker image

If you're using docker, replace the scenario-player command with a docker run command, like so:

docker run -i -t \
   -v ${DATA_DIR}:/data \
   -v ${WALLET_DIR}:${WALLET_DIR}:ro \
   raidennetwork/scenario-player:${branch}

As you can see, you'll have to mount some local directories to the container, otherwise the container will not run. DATA_DIR is the location of your blockchain data, and the WALLET_DIR should point to the location of your wallet file.

Scenario Examples

For example scenarios have a look at the Raiden repository's scenarios. These can be found here.

scenario-player's People

Contributors

czepluch avatar dominik1999 avatar eorituz avatar karlb avatar palango avatar ulope avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.