Git Product home page Git Product logo

qunit-phantomjs-runner's Introduction

PhantomJS Runner QUnit Plugin Build Status

A PhantomJS-powered headless test runner, providing basic console output for QUnit tests.

The runner requires PhantomJS. If you don't want to deal with installing PhantomJS or using Grunt to run your tests, try node-qunit-phantomjs.

Installation

$ npm install qunit-phantomjs-runner

Usage

$ phantomjs path/to/runner.js [url-of-your-qunit-testsuite]

With options:

$ phantomjs [phantom arguments] path/to/runner.js [url-of-your-qunit-testsuite] [timeout-in-seconds] [page-properties]

Show test cases:

$ phantomjs path/to/runner-list.js [url-of-your-qunit-testsuite]

Example setting the viewport size:

$ phantomjs path/to/runner-list.js [url-of-your-qunit-testsuite] 5 '{"viewportSize":{"width":1000,"height":1000}}'

Timeout

In v2.0, a default timeout of 5 seconds was added. The timeout was optional before. This could cause tests to break, which is the reason for the major version bump.

Notes

  • Requires PhantomJS 1.6+ (1.7+ recommended).
  • QUnit plugins are also available for gulp and Grunt.

License

The MIT License

Copyright (c) 2014, Jonathan Kemp

qunit-phantomjs-runner's People

Contributors

backflip avatar discojonathan avatar jonkemp avatar luka-zitnik avatar nsams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

qunit-phantomjs-runner's Issues

Publish to npm

Publish this as a package on npm so it can be included as a dependency in other projects.

Race Conditions

Solution is most likely to do the following:

  • disable QUnit autostart
  • onload:
    • attach logger
    • manually start tests via QUnit.start()

@trentmwillis thoughts on the QUnit side? If you have a better idea for coordinating the runner + qunit boot.

Handle page.onError for better debugging

PhantomJS provides an onError callback that could be implemented to provide better insight to errors in invoked qunti html page. Right now its pretty impossible to diagnose issues that exist in PhantomJS and not within a browser using the QUnit /index.html test page.

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.