Skip to content

Phing task for running qunit tests headless with phantomjs

Notifications You must be signed in to change notification settings

namesco/phing-task-qunit

This branch is 3 commits ahead of, 2 commits behind martinj/phing-task-qunit:master.

Repository files navigation

QUnit Phing Task

This project is a Phing build tool task for running QUnit tests headless with PhantomJS

Requirements

This project has been tested with

Example

To use this task, add the classpath where you placed the QunitTask.php in your build.xml file:

<path id="project.class.path">
	<pathelement dir="dir/to/qunittaskfile/"/>
</path>

Then include it with a taskdef tag in your build.xml file:

<taskdef name="qunit" classname="QunitTask">
	<classpath refid="project.class.path"/>
</taskdef>

You can now use the task

<target name="qunit" description="Javascript Unit Test">
	<qunit executable="DISPLAY=:0 /path/to/phantomjs" haltonfailure="true" runner="${basedir}/tests/run-qunit.js">
		<fileset dir="${basedir}">
			<include name="tests/runner.html" />
		</fileset>
	</qunit>
</target>

Task Attributes

Required

There are no required attributes.

Optional

  • runner - Specifies the qunit runner, look at run-qunit-example.js
  • executable - Path to phantomjs command.
  • haltonfailure - If the build should fail if any test fails.

About

Phing task for running qunit tests headless with phantomjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 56.2%
  • JavaScript 43.8%