Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    replaylib 0.1

    Download button

    No screenshots available
    Downloads: 189  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Scott Torborg and Mike Spindel | More programs
    GPL / FREE
    June 17th, 2010, 01:28 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    replaylib description

    Record and replay httplib actions for testing

    replaylib is a (very experimental) library that allows you to install replacement stubs for httplib methods which record interactions with remote servers, and then play them back. Because urllib depends on httplib functionality, replaylib will record and play back urllib interactions as well.

    It is intended to allow streamlined tests for services which interact with remote services: e.g. payment processors, shipping APIs, etc. To use it, just:

     1. Run your test suite while recording with replaylib.
     2. On subsequent runs, play back from replaylib. Tests will run faster, and won't require external services.

    It is fully tested, with 100% line and branch coverage, and works well with all APIs we have tried it on "in the wild".

    Note Use at your own risk!

    Installation

    Simple as:

    easy_install replaylib

    Or if you prefer, download the source and then:

    python setup.py build
    python setup.py install


    Example

    >>> import replaylib
    >>> import urllib

    >>> replaylib.start_record()
    # Do some stuff with urllib.
    >>> urllib.urlopen('http://www.google.com')
    >>> replaylib.stop_record('activity.pkl')

    >>> replaylib.start_playback('activity.pkl')
    # Won't actually make a request to google.com
    >>> urllib.urlopen('http://www.google.com')
    >>> replaylib.stop_playback()


    Nose Plugin

    ReplayLib also comes with a nose plugin to make recording and playing back the interactions used by your test suites even simpler:

    nosetests --replaylib-record=test.pkl
    nosetests --replaylib-playback=test.pkl



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    replay httplib | record actions | record | replay | httplib

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM