Over a million developers have joined DZone.

Testing Tuesday #20: Continuous Deployment for Node.js Applications

DZone's Guide to

Testing Tuesday #20: Continuous Deployment for Node.js Applications

· DevOps Zone ·
Free Resource

Easily enforce open source policies in real time and reduce MTTRs from six weeks to six seconds with the Sonatype Nexus Platform. See for yourself - Free Vulnerability Scanner. 

This is the 20th Testing Tuesday episode. Every week we will share our insights and opinions on the software testing space. Drop by every Tuesday to learn more! Last week we started testing Node.js applications with Jasmine.

How to Deploy a Node.js App to Heroku

In this screencast we’ll deploy a very simple Node.js web application to Heroku continuously with the help of the Codeship.

Disclaimer: We show a lot of the Codeship in this screencast – that’s because we use it and because we build it. There are certainly other ways to continuously deploy Node.js applications. This is how we do it.

By Continuous Deployment we mean that every change to our application gets deployed immediately, if our application still works. To prove that our application still works, we’ve got tests in Jasmine, a JavaScript testing framework. Want to know more about Jasmine? There’s more on it in this Testing Tuesdays episode.

After we created a Heroku application and set up a Codeship project, the Codeship will take care of the rest: Whenever we push a new version of our app to GitHub, it will pick it up, run the Jasmine tests for us and deploy the application if everything works.

This way we can safely push every change to our application. If our tests succeed, our changes go live. Otherwise the build will fail and we’ll have to fix the bugs.

Special thanks go to Modulus for their excellent blog post “An absolute beginner’s guide to node.js”. We used the post’s example web app in this screencast.

Up Next Testing Tuesday: Testing JavaScript with QUnit

Next week will be the last Testing Tuesday episode for this season. We’ll talk about QUnit and how it compares to Jasmine. If you’ve got any questions or suggestions, please leave a comment!

Further info:



Automate open source governance at scale across the entire software supply chain with the Nexus Platform. Learn more.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}