Skip to main content

12 must-have code testing tools

New code and user testing (opens in new tab) 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. Need more tools? Keep it simple with a website builder, secure with cloud storage, and make sure your web hosting is just right.

01. Jasmine (opens in new tab)

Jasmine is a behaviour-driven development framework for testing JavaScript (opens in new tab) 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 (opens in new tab)

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

03. Chai (opens in new tab)

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

04. QUnit (opens in new tab)

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 (opens in new tab)

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

06. Karma (opens in new tab)

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 so they can see which browsers and tests passed or failed.

07. Selenium (opens in new tab)

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.

08. WebdriverIO (opens in new tab)

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 set up work and manages the Selenium session for you.

09. Nightwatch (opens in new tab)

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 (opens in new tab) to perform commands and assertions on DOM elements.

10. PhantomCSS (opens in new tab)

PhantomCSS takes screenshots captured by Casper.js 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 (opens in new tab)

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

12. Percy.io (opens in new tab)

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.

This article was originally published in net magazine (opens in new tab) issue 285.

Related articles

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

Alicia is a frontend developer and public speaker from Boston, MA. She loves thinking about frontend architecture, digging into HTML and CSS specs, and exploring frontend best practices