Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/derhuerst/chutney

Run TAP tests at Sauce Labs.
https://github.com/derhuerst/chutney

browser browserify sauce-labs tap tape tests

Last synced: about 5 hours ago
JSON representation

Run TAP tests at Sauce Labs.

Awesome Lists containing this project

README

        

# chutney

**Run [TAP](https://en.wikipedia.org/wiki/Test_Anything_Protocol) tests at Sauce Labs.** A more opinionated [smokestack](https://github.com/hughsk/smokestack). [airtap](https://github.com/airtap/airtap) is a another, well-known alternative.

[![npm version](https://img.shields.io/npm/v/chutney.svg)](https://www.npmjs.com/package/chutney)
[![build status](https://img.shields.io/codeship/9cea8f70-b28e-0135-65f0-768b43f5dae4/master.svg)](https://app.codeship.com/projects/258106)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/chutney.svg)
[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)
[![chat with me on Twitter](https://img.shields.io/badge/chat%20with%20me-on%20Twitter-1da1f2.svg)](https://twitter.com/derhuerst)

1. Using [localtunnel](https://github.com/localtunnel/localtunnel#readme), **exposes the test runner HTML page with your tests**,
2. **opens its URL in a [Webdriver](https://www.w3.org/TR/webdriver/)-controlled browser at [Sauce Labs](https://saucelabs.com/)**,
3. **pipes their output to `stdout`**, so that you can use it as a drop-in replacement for `node test.js`.

It is is heavily inspired by [smokestack](https://github.com/hughsk/smokestack), but more lightweight because it will run the tests only on *remote* browsers. It is less battle-proven and has less niche features.

## Installing

```shell
npm install chutney
```

## Guide

**chutney requires you to have [TAP-generating tests](https://en.wikipedia.org/wiki/Test_Anything_Protocol), which you bundle** e.g. using [Browserify](https://github.com/substack/node-browserify#readme). **You will also need a [Sauce Labs](https://saucelabs.com/) account.**

```js
// test.js
const test = require('tape')
const awesomeTool = require('.')

test('awesome tool is awesome', (t) => {
t.plan(1)
t.equal(awesomeTool(), 'awesome')
})
```

Export your Sauce Labs credentials as well as the desired platform & browser.

```shell
export SAUCE_USER=derhuerst
export SAUCE_KEY=1a04c633-6a58-4aba-8287-54fdd18f9851
export PLATFORM='Windows 10'
export BROWSER=Chrome
```

Now run the tests. You may pretty-print the results using [any reporter](https://github.com/substack/tape#pretty-reporters) like [tap-spec](https://github.com/scottcorgan/tap-spec#readme).

```shell
browserify test.js | chutney | tap-spec
```

## Usage

```
Usage:
chutney [--timeout ]

Options:
--timeout -t Set the timeout in seconds. Default: 20

Examples:
browserify test.js | chutney | tap-spec
```

## Contributing

If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/location/issues).