So: how to test javascript correctly? Type of unit tests and the like ...
Closed due to the fact that Cyrus participants, Vladimir Martyanov , Aries , Vladimir Glinskikh , Kromster , are not on topic . 16 Sep '15 at 9:16 .
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
- " Questionnaires are forbidden on Stack Overflow in Russian . To get an answer, rephrase your question so that it can be given an unambiguously correct answer." - Cyrus, Vladimir Martyanov, Aries, Vladimir Glinskikh, Kromster
- onedepends on the code ... and on the developers ... show what you want to test - timka_s
- onefor example, a slider that behaves differently, depending on the amount of content ... - megacoder
- oneWhat do you want to receive as a result of tests? - triplustri
- oneI want to get the secret of the universe! :) And what do they want from the tests? At least passed or not. - megacoder
- oneDebug and Testing - Different Things - Specter
5 answers
If it’s about debugging, then https://addons.mozilla.org/en/firefox/addon/firebug/ install, press F12, tab - Console, reload the page
Quote from David Flanagan's book " JavaScript - A Detailed Guide ."
If you constantly encounter errors in JavaScript scripts, you are probably interested in a real JavaScript debugger. In Internet Explorer, you can use the Microsoft Script Debugger debugger, in Firefox , you can use the plug -in module known as Venkman . The description of these tools goes far beyond the scope of this book, but you can easily find it on the Internet using some sort of search engine. Another tool that, strictly speaking, is not a debugger, is jslint ; It is able to find common errors in the JavaScript code of programs (http://jslint.com).
- 6Book 2008 release, during this time, oh, how many new things have appeared) - Bandicoot87
If you are working with a project in Java, you can use JUnit and drive with the help of the Java built-in JavaScript interpreter (Mozilla Rhino).
For testing webkit based browsers - phantom.js