Code Monkey home page Code Monkey logo

gramophone's Introduction

Gramophone Build Status

Gramophone is a Graphical Intergation Testing utility, for web applications and websites. It allows you to record a session (to a file) and play it back.

screenshot

Dependencies

Usage (v0.1.0)

  • Download Gramophone (gramophone.nw).
  • nw gramophone.nw

Data Structure

Gramophone uses simple json for describing the steps:

[
  {
    "type": "load",
    "url": "http://github.com"
  },
  {
    "type": "navigate",
    "url": "https://github.com/"
  },
  {
    "selector": ".header-actions > .button:nth-child(2)",
    "type": "assert-class",
    "value": "button"
  },
  ...
]

Events

The following events can be recorded (there will be more):

  • Click - When click occurs
  • Change - When a change occurs (input, select, contenteditable)
  • Navigate - When a new page loads

Assertions

The following assertions are supported (there will be more):

  • Text - Match for the given elements textContent
  • Element - Match for the given selector for an HTMLElement
  • Class - Match for a class in the HTMLElements classList
  • Attribute - Match for an attribute of the HTMLElement

Continues Integration

Gramophone is developed with CI in mind.

It uses CasperJS with a script tester.coffee.

To run a test file just run:

casperjs tester.coffee --file=/path/to/file.json

Roadmap

Gramphone is in early stages, a lot of features will be added:

  • More assertions (position, size, wait, etc...)
  • More events (focus, blur, select, file upload, etc...)
  • Mocks for alert, confirm, prompt
  • Follow new windows (window.open)
  • Settings for assertions / events
  • Support for multiple scenarios / file
  • Use a simpler build / development system
  • Other adapters (basic phantomjs, zombiejs, selenium, etc...)
  • Integrations (Rails, Express, etc...)
  • And more...

Issues and suggestions

If you found some bugs or have suggestions, open a ticket in Issues.

Hacking

Gramophone is build with Diamond

In order to start the application in development mode, follow these steps:

  • Clone Diamond git clone https://github.com/gdotdesign/diamond
  • Install dependencies cd diamond && bundle
  • Symlink the executable ln -sf `pwd`/bin/diamond /usr/local/bin/diamond
  • Get the Node Webkit executable and symlink nw
  • Install PhantomJS and CasperJS
  • Start Gramophone diamond nw

gramophone's People

Contributors

gdotdesign avatar

Watchers

 avatar 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.