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
1
vote
2 answers

How to handle Confirm Box within JsTestDriver

I am using JsTestDriver for unit tests in JS. One section of my code uses a confirm box to allow users to confirm or cancel a decision. How to I test both the confirm and cancel selections of this confirm box automatically within the scope of…
user490152
1
vote
1 answer

Testing User Interaction with JavaScript

I can't get Lettuce / Splinter or JsTestDriver to run tests of user interaction with Backbone-generated DOM objects. For example, at the hello backbone tutorial, I want to simulate the user's click on the button labeled "Add list item", then verify…
chernevik
  • 3,922
  • 9
  • 41
  • 55
1
vote
2 answers

jsTestDriver set up with Visual Studio 2010

Am following this tutorial to set up jsTestDriver with Visual Studio 2010: http://slmoloch.blogspot.com/2009/08/how-to-run-jstestdriver-with-visual_02.html I manage to start the jsTestDriver server and capture a browser but when i try and run the…
RyanP13
  • 7,413
  • 27
  • 96
  • 166
1
vote
1 answer

Not getting a response from Mockjax with JsTestDriver

I'm attempting to use mockjax to mock my jQuery Ajax calls; however, I am not able to find any good, working examples of how to effectively test the responses. The following code is a simple wrapper for the jQuery.Ajax object. It works but I want…
JamesEggers
  • 12,885
  • 14
  • 59
  • 86
1
vote
2 answers

Testing manually fired events in JsTestDriver

What is the best way to test for event handling in objects? I can't seem to figure this one out. I have an object that sets up a few event listeners and when it observes these events being fired it changes a dom object on the page. When I have…
JaredMcAteer
  • 21,688
  • 5
  • 49
  • 65
1
vote
1 answer

how to test focus within a focus event using jsTestDriver

Currently I am using jQuery 1.6.1 and jsTestDriver framework to test the following code snippet. The main purpose is test whether "#area" input element has got the focus after "#switcher" is triggered with a focus event. It didn't pass the test, but…
Michael
  • 11
  • 1
1
vote
1 answer

ReferenceError: CoffeeScript + JsTestDriver + Qunit

Currently I'm looking into TDD with CoffeeScript and JsTestDriver however I'm stuck on a ReferenceError thrown by JsTestDriver. Some info: Using the IntelliJ JsTestDriver plugin Testing via Chrome Configured JsTestDriver the same way as on:…
mark_dj
  • 984
  • 11
  • 29
1
vote
1 answer

How to include "require" in PhpStorm for my JavaScript code?

I am using the line canvg('canvas', svg); in my code. This means I need canvg.js. I have included canvg.js in my html header. However it gives me an error that "require is undefined". For those that don't know the first two lines of canvg.js…
Sharon
  • 138
  • 16
1
vote
2 answers

$(this).load(function () { .... } ); not working along with JSTestDriver

The source code adds a load event handler to an element using JQuery. I am testing this using JSTestDriver. The code looks something like this:- $(this).load(function () { alert("Foo"); }); When I run the tests the…
user855
  • 19,048
  • 38
  • 98
  • 162
1
vote
1 answer

"namespace is undefined" problem when using jsTestDriver, Idea 9 and testing 3 test cases. Sometimes it just outright hangs

I just started using jsTestDriver and I really like it, but all of a sudden, I just started getting a very weird error and I'm not sure what the heck I did to create it. Actually, if I try and run a basic Greeter test, the same problem…
egervari
  • 22,372
  • 32
  • 121
  • 175
1
vote
0 answers

Is it possible to get autocompletion and intellisense for JsTestDriver in Eclipse?

I'm currently using Eclipse (ENIDE - node studio edition) to run jsTestDriver tests. Is it possible to get code completion and Intellisense working for jsTestDriver features? e.g. code completion doesn't work on assertEquals in the following…
Dave00Galloway
  • 609
  • 1
  • 6
  • 20
1
vote
0 answers

Error while running JsTestDriver

JsTestDriver is throwing this error line 63:35 mismatched input 'with' expecting Identifier line 63:82 missing RPAREN at ';' I'm running this command java -jar jsTestDriver/JsTestDriver-1.3.4.b.jar --config jsTestDriver/jsTestDriver.conf…
Tejus Prasad
  • 6,322
  • 7
  • 47
  • 75
1
vote
1 answer

How to run JSTestDriver from the commandline if JSTD TestCase method is wrapped by RequireJS?

I recently added RequireJS to my project and now have rewritten my JSTestDriver testcases in such a way that they are wrapped by requireJS: //this does run when running from within WebStorm require(['backbone', 'models/ParametersModel'],function…
jorrebor
  • 2,166
  • 12
  • 48
  • 74
1
vote
3 answers

JsTestDriver easy appending of elements to the body via :DOC syntax?

I'm using js-test-driver to test my Javascript code on several browsers: TestCase("DropDownValueReplacerTestCase", { setUp:function() { console.log("BEGIN: setUp"); /*:DOC +=
*/ console.log("END:…
leeand00
  • 25,510
  • 39
  • 140
  • 297
1
vote
0 answers

Load JavaScript files from jar when running js-test-driver

Is there a way to load JavaScript files from jars when running tests with js-test-driver? I'd like to find a solution that works both from command line and from Eclipse. The reason I want to solve this is that I'm trying to do a gradle build and…
levsa
  • 930
  • 9
  • 16
1 2 3
8 9