Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

First, great work on this implementation. I can't imagine all the work that must have gone into this.

To me, this seems to only solve a corner case in the main problem of JS testing - testing the DOM without a browser. The first question that comes to mind is, is a DOM even useful in a headless browser when it comes to JS? For now, grant that we're only testing presence and manipulation of DOM elements and no CSS manipulations or accuracy -- which I'd argue is a decent case for testing. Now, testing presence and manipulation of DOM elements in the abstract isn't very useful, as different browsers might treat DOM manipulations differently. Using a headless browser that no one actually uses doesn't solve this problem.

I'd see a case for this in running something like QUnit[1] test that just test JS completeness, but again, implementations differ so testing in one environment that no one actually is using isn't good enough.

The only thing that I've come up with for a solution for actually testing JavaScript in a robust, real-world way is using QUnit and Selenium[2] to define the tests, with Testswarm[3] actually running the tests. This setup allows unit tests to be run against JS by itself (QUnir), mock interactions to take place to ensure bindings work properly (Selenium), and have these executed against real browsers in a distributed manner (Testswarm).

I concede that this isn't an ideal solution, and I wish there were more people working on solutions like Zombie.js that would combine all of these in one so that JS could finally be apart of our continuous integration testing. The only (sic) thing preventing this solution is that it needs to have headless, identical implementations of all the browser's JS engines and DOM parsers in order to be valid.

[1] http://docs.jquery.com/Qunit [2] http://seleniumhq.org/ [3] https://github.com/jeresig/testswarm/wiki



There needn't be One Test Suite To Rule Them All.

I like having something similar to zombie.js during dev, then Selenium during CI triggered on git push, perhaps with Testswarm scheduled to run daily.


Is test swarm even still up? I can't ever seem to get the website to load in a reasonable amount of time.


See the 'Setting Up Your Own Swarm' section on https://github.com/jeresig/testswarm/wiki


it seems you're saying you run selenium using testswarm? Can you describe how that works in more detail?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: