# banoffee

> E2E testing for your node.js web app, using Selenium, ChromeDriver, Mocha, SauceLabs, ...

Latest version **0.0.3** (published 2014-11-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install banoffee
pnpm add banoffee
yarn add banoffee
bun add banoffee
```

Provides the command `banoffee`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-11-14 |
| First published | 2014-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.10.x |
| Dependencies | 16 |
| Known vulnerabilities | 0 (+22 in 2 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 4 |
| Author | Lupo Montero |
| Maintainers | lupomontero |
| Keywords | e2e, selenium, web driver, wd, saucelabs, mocha |

## Links

- npm: https://www.npmjs.com/package/banoffee
- Repository: http://github.com/lupomontero/banoffee
- Homepage: https://github.com/lupomontero/banoffee
- Issues: https://github.com/lupomontero/banoffee/issues
- npm.io page: https://npm.io/package/banoffee

## Dependencies (16)

- [wd](https://npm.io/package/wd.md) ^0.3.10
- [tar](https://npm.io/package/tar.md) ^1.0.2
- [chai](https://npm.io/package/chai.md) ^1.9.0
- [async](https://npm.io/package/async.md) ^0.9.0
- [mocha](https://npm.io/package/mocha.md) ^2.0.1
- [unzip](https://npm.io/package/unzip.md) ^0.1.11
- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.0
- [rimraf](https://npm.io/package/rimraf.md) ^2.2.8
- [checksum](https://npm.io/package/checksum.md) ^0.1.1
- [minimist](https://npm.io/package/minimist.md) ^1.1.0
- [progress](https://npm.io/package/progress.md) ^1.1.8
- [readdirp](https://npm.io/package/readdirp.md) ^1.1.0
- [executable](https://npm.io/package/executable.md) ^1.0.3
- [event-stream](https://npm.io/package/event-stream.md) ^3.1.7
- [chai-as-promised](https://npm.io/package/chai-as-promised.md) ^4.1.0

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2014-11-14
- 0.0.2 — 2014-02-27
- 0.0.1 — 2014-02-26
- 0.0.0 — 2014-02-25

## README

# banoffee

[![NPM](https://nodei.co/npm/banoffee.png?compact=true)](https://nodei.co/npm/banoffee/)

[![Build Status](https://secure.travis-ci.org/lupomontero/banoffee.png)](http://travis-ci.org/lupomontero/banoffee) [![Dependency Status](https://david-dm.org/lupomontero/banoffee.png)](https://david-dm.org/lupomontero/banoffee)
[![devDependency Status](https://david-dm.org/lupomontero/banoffee/dev-status.png)](https://david-dm.org/lupomontero/banoffee#info=devDependencies)

`banoffee` is a test framework that allows you to test your site's behaviour on
different browsers. `banoffee` uses WebDriver to allow you to programmatically
control the browser in your tests.

`banoffee` heavily relies on [wd](https://github.com/admc/wd),
[Mocha](https://github.com/visionmedia/mocha),
[selenium-server-standalone](https://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.39.0.jar),
[chromedriver](https://code.google.com/p/selenium/wiki/ChromeDriver) and
[Sauce-Connect](https://saucelabs.com/docs/connect).

* * *

## Dependencies

* `node`
* `java`

> Not tested on Windows at all :-(

## Installation

```sh
npm install -g banoffee
```

## Configuration (`banoffee.conf.js`)

Before you start running your tests you will need a configuration file
where you can tell `banoffee` where to find the files with your tests, what
Selenium server to connect to, what browsers to test on and so on.

Create a file called `banoffee.conf.js` in your project's root. In this example
we only specify the directory where `banoffee` should look for tests, so
everything else will use a default value:

```js
module.exports = {

  testDir: 'test'

};
```

An example `banoffee.conf.js` file using SauceLabs Sauce Connect:

```js
module.exports = {

  testDir: 'test',

  remote: {
    hostname: 'ondemand.saucelabs.com',
    port: 80,
    user: '<YOUR-SAUCELABS-USERNAME>',
    pwd: '<YOUR-SAUCELABS-PASSWORD>'
  },

  platforms: [
    {
      browserName: 'chrome',
      version: '32',
      platform: 'Linux',
      tags: [ 'example' ],
      name: 'myapp e2e'
    },
    {
      browserName: 'firefox',
      version: '27',
      platform: 'Linux',
      tags: [ 'example' ],
      name: 'myapp e2e'
    }
  ]

};
```

### Configuration options

#### `testDir`

#### `testFilePattern`

#### `remote`

#### `platforms`

## Writing your tests

Lets say you put your tests in a `test/` directory inside your project. An
example file `test/index.spec.js` could look something like this:

```javascript
describe('homepage', function () {

  var url = 'http://localhost:3000/';

  beforeEach(function () {
    return browser.get(url);
  });

  it('should retrieve the page title', function () {
    return browser.title().should.become('The page title!');
  });

});
```

## Running your tests

Ok, so now you have a test and a config file, so lets get cracking!

You can run your tests from the command line. Assuming you are in the root
directory of your project and that your `banoffee.conf.js` is in the current
directory, you can simply run:

```sh
$ banoffee
```

Without any arguments, `banoffee` looks for a `banoffee.conf.js` file in the
current working directory.

We can also specify the config file to use as an argument, so if we wanted to
have separate configs for develepment and continuous integration for example,
you could have two config files and run:

```sh
$ banoffee --conf banoffee.dev.js
```

and

```sh
$ banoffee --conf banoffee.continuous.js
```

## Using `banoffee` programmatically

```javascript
var banoffee = require('banoffee');

banoffee({ testDir: 'test' }, function (err, failures) {
  // ...
});
```

* * *

## Notes

* [Chromedriver doesn’t run in tmux and here’s how to fix it](http://borkweb.com/story/chromedriver-doesnt-run-in-tmux)
* [Running Karma and Chrome under tmux on OSX](http://savanne.be/804-running-karma-and-chrome-under-tmux-on-osx/)

---
_Source: https://npm.io/package/banoffee · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
