Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

Download “The DevOps Journey - From Waterfall to Continuous Delivery” to learn learn about the importance of integrating automated testing into the DevOps workflow, brought to you in partnership with Sauce Labs.

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:

Transcript



 

Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure, brought to you in partnership with Sauce Labs

Topics:

Published at DZone with permission of Clemens Helm, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}