12 JS Code test necessary tools (translation) _javascript skills

Source: Internet
Author: User
Tags webdriverio

New code, user test tools, and frameworks are generated every day. The following list lists the code tools that can be used to complete a variety of test requirements. You should investigate to see if these tools apply to your technology stack and technical requirements.

Jasmine.

Jasmine is a behavioral-driven test development framework for testing JavaScript code. It does not rely on any other JavaScript framework, nor does it require DOM. Its syntax is concise and unambiguous, and it's easy to write tests.

Mocha

Mocha is a feature-rich JavaScript test framework that runs both in node.js environments and in browser environments. Mocha runs the tests serially, makes flexible and accurate reports, and maps the outstanding exceptions in the tests to the correct test cases.

Chai

Chai is a library that supports BDD/TDD and can be used for node and browsers, in conjunction with any JAVASCRIPT test framework.

Qunit

Qunit is a powerful and Easy-to-use JavaScript Unit test framework. Both the jquery, jquery UI, and Jquey Mobile projects Use this framework to test common JavaScript code.

Sinon

Sinon.js provides JavaScript with a separate spies, stubs, and mocks [translator Note: Spy, stubs, and mocks are test-specific nouns, stubs are often translated into piles, spies is the plural form of Spy, a way to monitor methods, calls, and Parameters of the technology]. It does not depend on anything and can work with any unit test framework.

Karma

Karma is a framework-independent test run for connected browsers. Each test result corresponds to each browser, and its testing and display is exposed to the developer through the command line so that they can see the browser test pass or fail.

Selenium

Selenium has a simple goal: to automate the browser. It is primarily used to automate test Web applications, but it simply takes into account network-based management tasks.

Webdriverio

Webdriverio allows users to add only a few lines of code to control the browser or mobile application, making the test code simpler, more concise, and easier to read. The integrated Testrunner also allows you to invoke asynchronous commands synchronously, so you don't need to care about handling Promise to avoid race conditions. In addition, it cancels out all the tedious setup work and will manage the Selenium session for you.

Nightwatch

Nightwatch.js is an easy-to-use node.js that is designed for browser-based apps and Web sites for terminal to Terminal (E2E) testing methods. It uses a powerful webdriver API to execute commands and assertions on DOM elements.

Phantomcss

Phantomcss gets a screenshot of the Casperjs capture, and uses resemble.js to compare it to the Datum diagram to test for RGB pixel differences. Phantomcss then generates an image variance contrast to help you find the cause.

Phantomflow.

Phantomflow uses the decision tree to provide a UI test scenario. For Phantomjs, the Nodejs wrapper for the Casperjs and Phantomcss--phantomflow is able to seamlessly describe the user process in code while generating structured tree data for visualization.

Percy.io

Percy provides iterative and fast feedback on visual changes, bringing the so-called continuous visual integration. It is implemented in the following way: Run the test suite, get the DOM snapshot and upload it to the Percy service, and eventually render it in the browser.

English Original: Must-have Code testing tools translation: Https://www.oschina.net/translate/12-must-have-user-testing-tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.