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
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    depends on the code ... and on the developers ... show what you want to test - timka_s
  • one
    for example, a slider that behaves differently, depending on the amount of content ... - megacoder
  • one
    What do you want to receive as a result of tests? - triplustri
  • one
    I want to get the secret of the universe! :) And what do they want from the tests? At least passed or not. - megacoder
  • one
    Debug and Testing - Different Things - Specter

5 answers 5

  1. You can work with QUnit with unit testing of almost any JavaScript, not necessarily just jQuery.
  2. You can work with Selenium in the system testing of websites, in particular, and JavaScript.

    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).

      • 6
        Book 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