Coder Social home page Coder Social logo

js-replay's Introduction

jsReplay

https://github.com/elliotnb/js-replay

Version 0.0.1.

Licensed under the MIT license:

http://www.opensource.org/licenses/MIT

Overview

jsReplay is a record and playback tool used for functional regression testing. It is a singleton with two modes of operation: record and playback.

In record mode, jsReplay will record all user events that occur on the page and log them silently in the background. When the recording is stopped, the entire user event log is sent to the console in JSON format.

In playback mode, jsReplay will read in a previously recorded JSON file, simulate all the user events and log any errors or mismatched elements on the page. When playback stops, a log of discrepancies and/or errors that occured during the playback is sent to the console in JSON format.

Playback usage

To playback a regression test you must first instantiate a new playback object. The constructor accepts a single argument -- a URL of a JSON file of the full playback script. The playback will not start until the start() method is invoked. Only one playback instance can run at a time.

var widgetTest = new jsReplay.playback("https://foobar.com/helloworld/widget-test.json");
widgetTest.start();

Record usage

To record a regression test, execute the following command:

jsReplay.record.start();

When you've finished recording your regression test, execute the following command:

jsReplay.record.stop();

The test script will be logged to the console as a JSON string. Save the JSON to a file for later playback.

Requirements

jsReplay currently requires jQuery 1.7+. Future versions of jsReplay will not require jQuery.

jsReplay only supports Chrome and has only been tested in Chrome 59. jsReplay should not be expected to function properly in other web browsers.

js-replay's People

Contributors

elliotnb avatar

Watchers

James Cloos 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.