Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.55 KB

README.md

File metadata and controls

51 lines (40 loc) · 1.55 KB

barong

crappy barong vector

It help us see things that cannot be seen with our mortal eyes.

Requirement

You will need to have Node.js installed.

Installation

Install using npm

$ npm install -g barong
$ npm install -g casperjs
$ npm install -g slimerjs

This will install barong, casperjs and slimerjs globally.

Usage

Create a config file

First thing to do is, you need to create the configuration files. You can use barong init to create a sample configuration file.

$ barong init

  Config initilized. We've included some sample config file for you to start with.

  barong.json               your main config file
  scenarios/
    capture-selector.json   capture with css selector
    capture-region.json     capture with custom region clip
    custom-viewport.json    change viewport size
    action-hover.json       do hover before capture
    action-click.json       do click before capture

This will create the main config file (barong.json) and some sample scenarios (scenarios/*).

Do the captures

After you adjust the config file, you can start creating the reference files, by doing:

$ barong capture [config]

This will run through all your scenarios configuration and do the captures.

Do the test

After creating the reference files, you can start capture the the pages that you want to compare, by doing:

$ barong test [config]

After capturing files based on all scenarios, it will open a page to show the result.