Skip to content

martinj/phing-task-qunit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

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

Contributors 4

  •  
  •  
  •  
  •