Jani Hartikainen gets you started with unit testing your JavaScript — an important, but often overlooked part of development — using Mocha and Chai.
Tag: unit testing
Camilo Reyes explores what it takes to unit test React components and the thought process required for making components testable.
Let's take a fresh look at PHPUnit - the de-facto TDD tool for PHP. We'll explain TDD on an example, implement code coverage, and more!
Chris writes test watchers: auto-compiling PHP from Preprocess files, and auto-testing after every file-change. No need to manually run PHPUnit ever again!
Functional code is often touted as easier to test. M. David Green examines that claim and demonstrates how to get started testing functional JavaScript.
We focus on Behat now to further extend Sylius in true TDD fashion. We write stories, we test against them, and then we develop features to make them pass!
Deji extends the core of Sylius by adding some back end features via true TDD: writing PhpSpec tests first, seeing that they fail, and then making them pass
Jani Hartikainen looks at testdouble.js (a new mocking library with a streamlined API) and puts it head-to-head with Sinon.js, the JS test double incumbent.
James Wright introduces test-driven development and walks through creating and refactoring a simple form validation library, step-by-step, as an example.
We look at Sylius - a fully tested and super-robuts e-commerce platform/framework, and use it to learn some proper Test Driven Development!
Alex Bilbie looks at Jenkins' newest feature: pipelines. With it, we configure Laravel's auto-testing procedure, and make sure our builds stay alive!
Matthew Setter takes an introductory look at atoum - an alternative to PHPUnit with an interesting twist
Here's a quick way to get rid of filesystem troubles (cleanup anyone?) when practicing TDD - virtual file systems!
We use tests to test our code. But... how do we test our tests? Let's take a look at Humbug: a mutation testing framework!
Chris Pitt starts developing a new PHP package with TDD practices in mind - using PhpUnit and Mockery all the way. Check it out!
Eric Elliott takes JavaScript testing under the microscope, examining the kinds of tests available and demonstrating how they enhance software stability.
In this Sinon tutorial, Jani Hartikainen demonstrates how to make unit testing non-trival JavaScript code trivial with the help of spies, stubs and mocks.
Vitalij Mik goes through a from-scratch UseCase implementation to demonstrate Clean Code Architecture and Test Driven Development on a Guestbook app!
Jani Hartikainen explains how to deal with promises in unit tests using Mocha and Chai as the base and showing promise-related patterns that occur in tests.
Younes Rafie demonstrates the use of Selenium for acceptance testing and browser automation in tandem with PHPUnit
In this article Ravi Kiran covers most of the AngularJS testing tips that he learned over the past two years. You'd better not miss it!
Ravi Kiran continues to discuss how to test AngularJS-based projects by teaching you how to test directives.
With version 8 looming on the horizon, Danny ups our development game with automated testing of Drupal 8 modules - write functional tests like a pro!
Thanks to dependency injection, AngularJS makes it easy to unit test your code. Ravi Kiran shares some tips on testing services, controllers and providers.
This article provides pointers on mocking dependencies in AngularJS unit tests.
Shaumik Daityari explains how to write unit test to automate the process of debugging a codebase in Git.
This article explores the process of testing asynchronous code using QUnit. This is a followup to a previous article on writing synchronous QUnit tests.
This article introduces the QUnit testing framework. It also explains how the QUnit assertions work.
Matthew Setter talks Unit Testing with GuzzlePHP - mocking responses and enqueuing requests in a spawned NodeJS server
This article explains how to create unit tests using AngularJS. From there, the article moves on to end to end testing in AngularJS.