Can Chutzpah run qunit tests from a url? I need a lot of server-side injected markup and json data in my qunit tests, so I like to run the test suite within my visual studio project on localhost instead of mocking tons of test data in my test.js files.
Asked
Active
Viewed 378 times
1
-
Do I understand correctly - these tests are dependent on the web-app running on localhost? And they will load resources (html/javascript/JSON) from the running web-app and run tests against them? – GarethOwen Mar 27 '13 at 10:55
-
yes... they are dependent on localhost and run tests against server-created ressources – fbuchinger Apr 02 '13 at 09:47
2 Answers
3
As of version 2.4 Chutzpah now supports running against a remote url. See the documentation here.

Matthew Manela
- 16,572
- 3
- 64
- 66
0
Maybe it helps to share our testing strategy.
We use chutzpah for javascript unit tests. No dependency on a running server. The tests run very quickly as part of the build. (But we are not testing generated javascript code which is your scenario).
We test against running server by writing tests in JavaScript and running them with PhantonJS. See my answer for an example of one of our tests: automated functional web GUI testing frameworks (asp.net)
If you don't like writing the tests in Javascript like this (it is not as nice as using a unit testing framework - like qUnit or jasmine) you could checked out CasperJS.

Community
- 1
- 1

GarethOwen
- 6,075
- 5
- 39
- 56
-
1I agree with out, independent, pure client-side tests are the best way to go. However, if we hardcode server-generated json/markup structures in our tests, we risk that we test against outdated data. – fbuchinger Apr 08 '13 at 08:24
-
Definitely, and the balance between being helpful for catching regression bugs or annoying due to maintenance costs (when the outdated data needs to be updated) makes the worthiness of the tests questionable. – GarethOwen Apr 08 '13 at 09:36