Timeline for What should be tested in Javascript?
Current License: CC BY-SA 3.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 31, 2014 at 18:59 | comment | added | gnat | related: How do you unit test your javascript | |
| Jan 16, 2013 at 10:51 | answer | added | SBel | timeline score: -1 | |
| Nov 16, 2011 at 11:18 | vote | accept | Nathan Hoad | ||
| Nov 15, 2011 at 22:49 | comment | added | Nathan Hoad | Hmm we have some pretty unique needs here though, so writing software in house is pretty much what always happens. What usually happens is we find there's a limitation in the system we're using, and have to add or change something - SaaS like Testling doesn't seem to give us that option. | |
| Nov 15, 2011 at 14:20 | comment | added | Raynos | @NathanHoad Why you no support OS and buy testling :(. Buying software is always cheaper then writing it in house, especially if it does what you want. | |
| Nov 15, 2011 at 14:15 | comment | added | Nathan Hoad | @Raynos, I agree, it will be a mediocre version of testling! However my boss is huge on large scale automated testing (our last product has a few hundred unit tests that run every day) so a Selenium script that runs through each page and runs the tests is what I'll go with. It doesn't need to be particularly fancy, haha :P | |
| Nov 15, 2011 at 13:59 | answer | added | Sean McMillan | timeline score: 4 | |
| Nov 15, 2011 at 13:47 | comment | added | Raynos | @NathanHoad I personally just write a jasmine/nodeunit unit test suite and manually run it in all browsers. In theory you can write a little script to open all these browsers for you, that's about as automated as it gets. Anything more would just involve you rewriting a mediocre version of testling ;) | |
| Nov 15, 2011 at 13:47 | comment | added | Sean McMillan | @Raynos: jsTestDriver does run in the browser, but it runs in an (effectively) empty page. It's not that the DOM is missing, but that the elements are missing. (It also has adapters for qUint and Jasmine.) | |
| Nov 15, 2011 at 13:17 | comment | added | Nathan Hoad | Thanks. I was looking toward jsTestDriver as it claimed be able to run in the browser, which, while technically true, I've discovered isn't the same as running with QUnit. I've been working on my own tool at the moment that uses QUnit, with a custom Django debug toolbar panel. Using Selenium I'll be able to detect failing tests. Also, I doubt my boss would pay for testling, although it does look pretty good! | |
| Nov 15, 2011 at 13:09 | comment | added | Raynos | @NathanHoad You write unit tests that get run in the browser itself, nodeunit, qunit and jasmine are sensible tools. When running in the browser you have the DOM. You could use a tool like testling to automate browser testing. | |
| Nov 15, 2011 at 13:02 | comment | added | Nathan Hoad | @maple_shaft, that's essentially what the jQuery plugins we've written are; business logic. UI controls for things like user selection, modal dialogs and whatnot. The problem is, the controls use the DOM to store/represent results from ajax calls and user input, so there's no way to verify them without a DOM, that I know of. | |
| Nov 15, 2011 at 13:00 | comment | added | Nathan Hoad | Well, in the spirit of the question, @Raynos, could you suggest a better tool? | |
| Nov 15, 2011 at 12:43 | comment | added | maple_shaft♦ | You should be unit testing business logic. If your business logic and elements on the DOM are intertwined then you have a design flaw. Abstract out as much business logic from the page elements as possible so that it can be properly unit tested. For DOM element interaction verification you should be using Selenium. | |
| Nov 15, 2011 at 12:36 | comment | added | Raynos | You isolate any javascript code you've written into modules. Then you simply test the inputs and outputs of those modules. Any modules that deal with the DOM means you have to test the DOM. Use a better tool then jsTestDriver. | |
| Nov 15, 2011 at 11:21 | history | tweeted | twitter.com/#!/StackProgrammer/status/136403450132054016 | ||
| Nov 15, 2011 at 9:22 | answer | added | Sergey Stolyarov | timeline score: 5 | |
| Nov 15, 2011 at 9:11 | history | asked | Nathan Hoad | CC BY-SA 3.0 |