Don’t let your mocks lie to you!

This post introduces a new JavaScript testing library that works with Sinon.JS to vastly improve the speed of your integration tests and also improve the quality of some of your unit tests.

When we are writing code for some kind of client (could be a website), we usually want to test the layer of the . . . → Read More: Don’t let your mocks lie to you!

Super fast end-to-end tests

Automated end-to-end tests are often seen as a necessary evil. A common example is Selenium-based browser tests.

This kind of testing has many drawbacks:

They take a long time to run They require complicated setup They are fragile

But it doesn’t have to be like that!

In this talk I describe how we can write . . . → Read More: Super fast end-to-end tests

Extreme Programming – to the next level

Inspired by a blog post by Benji Weber on Modern Extreme Programming, tonight I am giving a presentation on these ideas. Find my slides below:

Extreme Programming – to the next-level from Lars Thorup . . . → Read More: Extreme Programming – to the next level

Testing Facebook integrations

At Staance Engineering, I have implemented some of our integrations with Facebook. We want to have automated tests that ensure that all our integration scenarios work as we want them to. This blog post describes how we do that using tools like Nock and Sinon.JS. The same techniques can be applied to most other types . . . → Read More: Testing Facebook integrations

Advanced JavaScript Unit Testing

I gave a talk yesterday at Mile High Agile 2015:

A lot of applications these days have a substantial, if not a major, part written in JavaScript. And not only for the front-end part, as Node.js is gaining popularity on the back-end. You might already have started doing some unit testing for your JavaScript code, . . . → Read More: Advanced JavaScript Unit Testing

Going mobile: expand existing app or write a new one?

One of my friends wrote to me the other day with an interesting architectural question, which I’ll paraphrase here:

What are your thoughts on running your client-side web apps in a mobile browser if you need to do more than just responsive design concepts? For instance if we want to limit some functionality for mobile . . . → Read More: Going mobile: expand existing app or write a new one?

New book: Being the project manager

This week Sju G. Thorup‘s book “Being the project manager” was published. ZeaLake supported Sju’s work, and I am very happy with the result.

“Being the project manager” is written for new project managers and people who aspire to lead a project. It is not a traditional textbook, and it is suited for Agile and . . . → Read More: New book: Being the project manager

Unit test your service integration layer

One of the complaints I hear most often about unit testing, is that its focus is too narrow. For instance, when testing a JavaScript front-end, the unit tests will make assumptions about the contract with the back-end API, typically by mocking the HTTP requests in the unit tests for the API integration layer. But those . . . → Read More: Unit test your service integration layer

6 Questions for your next JavaScript project

Introduction

When starting a new front-end JavaScript project, we have a lot of decisions to make. The JavaScript ecosystem has grown explosively over the past couple of years with exciting new tools, libraries and frameworks appearing on a weekly basis. To illustrate, look at the TodoMVC site that showcases different MVC frameworks: 15 main frameworks . . . → Read More: 6 Questions for your next JavaScript project

Inline test fixtures in JavaScript

When writing unit tests for our front-end JavaScript code, we often need to specify fixtures: static pieces of data that give the context for the test. A fixture can be a piece of HTML that the JavaScript function under test can operate on. Or a piece of XML that we mock the server to return. . . . → Read More: Inline test fixtures in JavaScript