12 款 JS 代码测试必备工具 已翻译 100%

oschina 投递于 2016/12/07 14:51 (共 5 段, 翻译完成于 12-08)
阅读 12502
收藏 78
6
加载中

New code and user testing tools and frameworks seem to pop up every day. Below is a varied list of code tools that accomplish various testing needs. Each one should be investigated to make sure it fits with your tech stack and technical needs.

01. Jasmine

Jasmine is a behaviour-driven development framework for testing JavaScript code. It doesn't depend on any other JavaScript frameworks and it doesn't require a DOM. However it does have a clean, obvious syntax so that you can easily write tests.

02. Mocha

Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.

已有 1 人翻译此段
我来翻译

03. Chai

Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework.

04. QUnit

QUnit is a powerful, easy-to-use JavaScript unit testing framework. It's used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code.

05. Sinon

Sinon.JS provides standalone test spies, stubs and mocks for JavaScript. It doesn't rely on dependencies, and works with any unit testing framework.

已有 1 人翻译此段
我来翻译

06. Karma

Karma is a framework-agnostic test runner for connected browsers. The results of each test against each browser are examined and displayed via the command line to the developer such that they can see which browsers and tests passed or failed.

07. Selenium

Selenium has a straightforward aim: to automate browsers. It is used primarily for automating web applications for testing purposes, but it can just as easily take care of web-based administrative tasks.

已有 1 人翻译此段
我来翻译

08. WebdriverIO

WebdriverIO lets users control a browser or a mobile application with just a few lines of code, making test code simple, concise and easy to read. The integrated test runner also lets you write asynchronous commands in a synchronous way so that you don’t need to care about how to handle a Promise to avoid racing conditions. Additionally it takes away all the cumbersome setup work and manages the Selenium session for you.

09. Nightwatch

Nightwatch.js is an easy to use Node.js based End-to-End (E2E) testing solution for browser based apps and websites. It uses the powerful W3C WebDriver API to perform commands and assertions on DOM elements.

已有 1 人翻译此段
我来翻译

10. PhantomCSS

PhantomCSS takes screenshots captured by CasperJS and compares them to baseline images using Resemble.js to test for rgb pixel differences. PhantomCSS then generates image diffs to help you find the cause.

11. PhantomFlow

PhantomFlow delivers UI testing with decision trees. It provides an experimental approach to UI testing, based on Decision Trees. A NodeJS wrapper for PhantomJS, CasperJS and PhantomCSS, PhantomFlow enables a fluent way of describing user flows in code whilst generating structured tree data for visualisation.

12. Percy.io

Percy provides iterative and fast feedback about visual changes, delivering what is calls continuous visual integration. It does this by running with a test suite, taking DOM snapshots, and uploading the, to the Percy service where they are rendered in a modern browser.

已有 1 人翻译此段
我来翻译
本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接。
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们。
加载中

评论(6)

哥2
Number of replies: 0
Started by: Jan Wieg
Last post: Nov 10, 2016 04:55:56 by Jan Wieg
yizhoubo
yizhoubo
thank you0
n
no_blood
可以,不错
魏晋秋
魏晋秋
标题都不写清楚点么?
貌似掉线
貌似掉线
JS代码测试工具
返回顶部
顶部