GithubHelp home page GithubHelp logo

0xflotus / airtap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from airtap/airtap

0.0 2.0 0.0 865 KB

Test your JavaScript in 800+ browsers.

License: MIT License

JavaScript 98.96% CSS 0.89% HTML 0.15%

airtap's Introduction

airtap

Test your JavaScript in 800+ browsers.

npm status node Build Status Dependency status

Airtap is an easy way to test your JavaScript in browsers, using a TAP-producing harness like tap or tape. Start testing your code locally in seconds and seamlessly move to cloud based browsers powered by Sauce Labs for better coverage.

Airtap is different than other cross browser test runners in its simplicity and ability to easily run your test suite in many browsers without having them installed locally. It lets you iterate quickly during development and provide good browser coverage before release without worrying about missing a supported browser.

Don't just claim your JavaScript supports "all browsers", prove it with tests!

This project is a fork of the amazing Zuul. Please note that our API is currently unstable and some documentation may be out of date. Anyone is welcome and encouraged to contribute towards 1.0.0 via a pull request.

Install

With npm do:

npm install airtap --save-dev

If you are upgrading or migrating from zuul: please see the upgrade guide.

Workflow

Airtap works out of the box with tap and tape. If you're already using these, setup will be trivial.

Airtap has 3 modes of operation: locally, cloud browsers, and continuous integration. You should make sure that airtap is working locally before you try to run the other two.

Airtap will do all the hard work of setting up your test harness, support files, and cloud browser integration so you can just focus on writing your tests.

Running locally

All you need is an entry point for your tests like test.js. When iterating on your tests during development, simply use --local mode to see your tests run in a browser.

See the included example for a simple test. Run it by issuing the following command in the example directory:

airtap --local 8080 test.js

It will print a URL that can you can open in any local browser to run the tests. Make changes to the code as needed. No need to restart airtap, just refresh your browser.

local screenshot

Cross browser testing via Sauce Labs

The reason we go through all this trouble in the first place is to seamlessly run our tests against all those browsers we don't have installed. Luckily, Sauce Labs runs quite a few browsers and we can easily task airtap to test on those.

See the Cloud Testing guide to get your tests running in the cloud. TLDR: save your credentials to ~/.airtaprc, add browsers to .airtap.yml and issue:

airtap test.js

Airtap itself is also tested in Sauce Labs.

Sauce Test Status

Continuous Integration

No testing setup would be complete without a badge for passing or failing tests. After making sure your tests all pass in the cloud from your local machine, we will configure our tests to pass from Travis when we commit changes. See the Travis CI guide.

travis screenshot

Configuration

Airtap consumes a YAML config file. See the airtap.yml guide for all of the goodies this file provides.

It includes advanced usage like how to run an additional server to support tests that make ajax requests.

Big Thanks

Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs.

Sauce Labs logo

License

MIT © Roman Shtylman, Zuul contributors and Airtap contributors.

airtap's People

Watchers

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