Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7887013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:28:11+00:00 2026-06-03T05:28:11+00:00

Is it possible to execute my QUnit (javascript) unit tests from Jenkins? My build

  • 0

Is it possible to execute my QUnit (javascript) unit tests from Jenkins? My build script is Apache Ant. Would Jenkins execute this as a separate Build Step, or would I need to add something in the config of my Ant build script?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:28:13+00:00Added an answer on June 3, 2026 at 5:28 am

    So, I have finally managed to figure this out.

    Here’s my end-to-end implementation:

    1. Install PhantomJS (http://phantomjs.org/) – I installed this in my build/tools folder

    2. Install the PhantomJS QUnit Runner script (https://gist.github.com/1588423) – also installed this in my build/tools folder

    3. Added the following target to my build.xml file:

        <target name="qunit" description="runs QUnit tests using PhantomJS">
          <!-- QUnit Javascript Unit Tests -->
          <echo message="Executing QUnit Javascript Unit Tests..."/>
          <apply executable="path-to-your-phantomjs-bin-folder/phantomjs" >
            <arg value="-path-to-your-build-tools/qunit-runner.js" />
            <arg line="--qunit path-to-your-qunit-folder/qunit.js --tests path-to-your-test-folder --juni path-where-you-want-to-write-the-JUnit-style-output/qunit-results.xml" />
            <fileset dir="${basedir}/${dir.test}" includes="tests.js" />
            <srcfile/>
          </apply>
        </target>
    
    1. Under my Jenkins project config, I now invoke Ant with “minify qunit”

    2. I point Jenkins to the JUnit-style output XML file

    And, here is the workflow:

    1. Check changes into my repo
    2. Jenkins will poll GitHub for changes
    3. If there are any changes, Jenkins will pull down
    4. Ant will be invoked, doing the build, then running my unit tests
    5. The test results will be published in a JUnit-like XML format
    6. Jenkins will analyse this output file. If no tests failed, the build will be marked as “Success”. If any tests failed, the build will be marked as “Unstable”
    7. Jenkins will deploy the web changes
    8. Jenkins will cleanup the work-area

    PS: At the moment, you have to manually delete the JUnit-type XML output file. I will fix this later.

    PS: Download the customized qunit.js (https://gist.github.com/2488794)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It it possible to execute mspec tests on appharbor aside from adding build action
Is it possible to execute Apache Ant build tool in a validation ode? e.g
Is it possible to execute a statement like this in NHibernate? SELECT * FROM
Is it possible to execute the Javascript in a PAC file from a .Net
Is it possible to execute shell script in command line like this : counter=`ps
From a PHP script, is it possible to execute another PHP-script with different GET
Is it possible to execute mysql query like this? select (select A from B
I want to know if it's possible to execute a javascript function from java.
It is possible to execute the following code from multiple threads simultaneously. this._sequencer.Completed +=
Is it possible to execute a specific sub in a vbs file from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.