Giter Site home page Giter Site logo

qunittestrunnerplugin's Introduction

QUnitTestRunnerPlugin

QUnitTestRunnerPlugin is a plugin for JsTestDriver that allows JsTestDriver to run QUnit tests.

This plugin differes from the QUnitAdapter that is bundled with JsTestDriver: QUnitAdapter is a wrapper over the JsTestDriver framework that translates from QUnit API calls to JsTestDriver methods. QUnitAdapter also does not support asynchronous tests.

QUnitTestRunnerPlugin uses the actual QUnit framework to run tests. Therefore the whole QUnit API is available - including asynchronous tests. QUnit is a well-tested framework; using it directly can help to keep your test suite as stable as possible.

Usage

QUnitTestRunnerPlugin relies on the latest JsTestDriver plugin support in trunk. Unfortunately using the latest stable release of JsTestDriver will not work. There is a JsTestDriver jar included in this project that was compiled from revision 714 of the JsTestDriver trunk that you can use to run QUnit tests. Or you can compile JsTestDriver yourself.

Include the files qunit.js and QUnitTestRunnerPlugin.js in the load directive in your JsTestDriver configuration file. Make sure that both of those files are loaded before any of your QUnit test files. Otherwise configure and run JsTestDriver according to the directions in the JsTestDriver documentation.

To run a single QUnit test module at a time give the description of the module in quotes as the value of the --tests option when running JsTestDriver. Currently there is no way to run individual tests - only whole modules.

QUnitTestRunnerPlugin is configured to automatically time out async tests after five seconds. To modify that duration edit QUnitTestRunnerPlugin.js and change the value of the DEFAULT_TIMEOUT variable. Leave the variable undefined to disable timeouts. Or you can specify a custom timeout duration per test by giving a timeout argument to the QUnit stop() function.

Known Issues

  • QUnit does not report test execution durations to JsTestDriver. All of your tests will be reported as having taken zero milliseconds to run.

qunittestrunnerplugin's People

Stargazers

chaitanya nalla avatar

Watchers

James Cloos avatar chaitanya nalla 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.