Questions tagged [js-test-driver]

js-test-driver is an open source JavaScript unit tests runner written in Java.

Js-test-driver, a project started at Google, is able to run from command line and reports results to the standard output. As a result, it is possible to fully automate JavaScript tests and run them on a continuous integration server.

The goal of JsTestDriver is to build a JavaScript test runner which:

  • easily integrates with continuous builds systems and
  • allows running tests on multiple browsers quickly to ease TDD style development.

Project page

122 questions
176
votes
1 answer

JsTestDriver on NetBeans stops testing after a failed assertion

I have set up JavaScript unit testing with JS Test Driver on Netbeans as per this Link. However, unlike the results in that tutorial, no more tests are executed after an assertion fails. How can I change this behaviour? For example, given this test…
Jodes
  • 14,118
  • 26
  • 97
  • 156
20
votes
1 answer

What's the advantage of using Sinon.js over Jasmine's built in Spys?

I'm piecing together a jsTestDriver/Jasmine environment for testing our front end code and I'm seeing a lot of references to Sinon.js for stand-alone (or drop in) spies. Could someone describe what Sinon.js brings to the table that Jasmine doesn't…
jpgrace
  • 401
  • 4
  • 9
9
votes
3 answers

How to run browsers(chrome, IE and firefox) in headless mode?

I want to integrate JSTestDriver with jenkins-CI. problem is that the build server does not have display. is there a way to run browsers headlessly? Thanks
Mukesh Kumar
  • 783
  • 1
  • 9
  • 24
8
votes
2 answers

Passing a command line argument to jstestdriver JAR from ANT?

I'm trying to use jstestdriver to generate some unit tests in my ant build in Windows. I plan to do this by running jstestdriver from an ant target using the ant task. So far for my ant build file I have the following:
leeand00
  • 25,510
  • 39
  • 140
  • 297
8
votes
1 answer

How to use remote browsers for js-test-driver task on Jenkins?

We use Jenkins for the continuous integration of .NET web applications with NAnt/NUnit for the .NET tests. Jenkins is configured with 9 slaves (all of which are Windows Server 2003) that runs many builds along with their automated tests. We are…
7
votes
2 answers

How to test AngularJS controller with JsTestDriver?

I have the following code: function TestStats($xhr) { $xhr( 'GET', '/test-dashboard/get-projects.json', angular.bind(this, function(code, response) { this.projects = response.projects; …
Noel Yap
  • 18,822
  • 21
  • 92
  • 144
7
votes
2 answers

Using closure library with jsTestDriver

I'm learning about google closure tools by writing a simple JavaScript game. I'm having trouble figuring out how to set up jsTestDriver so that it works well with closure library. Specifically: I'd like to use the goog.require mechanism to include…
Odalrick
  • 645
  • 5
  • 16
7
votes
4 answers

Jasmine + JSTestDriver + Coverage + RequireJS

Wow, what a mess. This is the scenario. Backbone driven JS app. RequireJS for AMD functionality, initialized like this: then inside main.js the following config…
Bernardo
  • 1,030
  • 1
  • 12
  • 22
6
votes
4 answers

How to test jquery and ajax calls using JsTestDriver?

I have a dynamic page built with jQuery. Html pieces are loaded from mustache templates. These templates are downloaded from a url, and I would like to unit test the overall html construction : The JsTestDriver test is : AppTest =…
Bruno Thomas
  • 1,179
  • 17
  • 31
6
votes
1 answer

Capturing browsers with Selenium RC

I want to run UI tests using browserfarms like BrowserStack. We are currently using BS to run Unit tests via JsTestDriver. So starting the server, letting a bunch of browsers created by the browserfarm connect to the jstd server and then execute the…
zhujik
  • 6,514
  • 2
  • 36
  • 43
5
votes
1 answer

Correct syntax for JS Test Driver "assertException"?

I'm trying to figure out how to correctly use JS Test Driver's assertException method. From google's documentation it should be: assertException([msg], callback, error). However, no matter what I do, I always get an [ERROR] for this test (instead of…
hous
  • 150
  • 9
5
votes
3 answers

Javascript JsTestDriver Jasmine & Jasmine-jquery

I have lots of Jasmine unit tests, that are running unit tests for Javascripts code. They are using Jasmine-jquery plugin to do DOM manipulation. they use loadFixture, to load fixtures of HTML I tried to automate those unit tests, using…
Ghassan Karwchan
  • 3,355
  • 7
  • 37
  • 65
5
votes
0 answers

js-test-driver + coverage plugin crashes on javascript 1.7 statements

Trying to add tests support into my project. Attached JsTestDriver with coverage plugin. Dummy tests are working correctly, but when I load up all my source files I'm getting application crashed with the following: [java] **line 109:12 no viable…
Chorn
  • 49
  • 3
5
votes
3 answers

JSTestDriver and Continuous Integration

I am trying to use JSTestDriver to automate my Javascript tests with Hudson as the Continuous Integration backend. I'm aiming to get Hudson to at least produce a report on the test results, with failing a build upon failed test as the most…
BeraCim
  • 2,317
  • 8
  • 49
  • 78
5
votes
2 answers

How to unit test Javascript code that interacts with DOM elements

Background: I'm coming from Java background so not too familiar with Javascript. We are planning to introduce JavaScript unit testing to both our existing (legacy) code and future work. We are a java shop (Spring, Weblogic etc) mainly. We are…
Ashkan Aryan
  • 3,504
  • 4
  • 30
  • 44
1
2 3
8 9