The Shippable Blog

Create visualizations of your continuous integration test results

In this tutorial, I'll show you how to configure visualizations of Continuous Integration test results. This visualization not only looks good, but also helps a developer to drill down on tests that failed and find the root cause much quicker.

Here's how a successful Continuous Integration test result would look.

Configuring a build badge for a Node.js project status

I have gone through the steps of running  basic Continuous Integration (CI) on a Node.js app hosted on a private repository. Now I'll configure a visual indicator to display the status of the Node.js app when CI is run, using build badges. As shown below, I use it to update my team mates about the latest build status of my project in a convenient way.

First, what is a Badge and where is it used?

Badges, in the context of continuous integration, are used to display the meta-data of a build. For example, at the completion of a build, a status is displayed on whether a build succeeded or failed. This build status is incorporated into a build badge and can be displayed to viewers in different ways and in different locations. Badges are used to display different meta-data such as build status, code coverage percentage, status of third party dependencies, release versions, etc.

In this tutorial, I'll configure the Node.js app on Shippable to embed build status in two ways and show few examples of the outcome.

Running CI on a Node.js application hosted on a private repository

In my previous blogs, I completed running a basic Continuous Integration (CI) on a Node.js app hosted on a public repository. Next, I configured a simple unit test for the Node.js app to check for errors each time I did a code commit. 

In this tutorial, I'll cover running CI for the same Node.js application, if it were hosted on a private repository. Hosting code on a private repository source control system is the common way developers/teams operate during software development. The overview of the work flow is to sign in using source control provider credentials, authorizing a one-time access to private repositories, enabling the project, configuring the shippable.ymlfile, completing a successful CI run for the Node.js app.

Configuring a unit test to check for errors on the Node.js application

In the previous tutorial, I ran a basic Continuous Integration (CI) on a Node.js application. As the next logical step, I'll configure a simple unit test to check for errors in my code. As per the guidelines of CI, my expectation is that for every code commit or pull request, this unit test runs automatically and immediately checks for errors. In this tutorial I will set up a unit test, configure the shippable.yml, and verify the unit test to complete a successful CI.

Running Continuous Integration on a Node.js app

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. By integrating regularly, you can detect errors quickly, and locate them more easily.

Shippable's CI platform supports different source control providers, languages, platform, notification providers, Docker registry services, container services and IaaS/PaaS providers for an end-to-end application delivery pipeline. In this tutorial, I'll go over basic CI for a simple Node.js app. The work flow includes sign up, enabling the repository that hosts the Node.js app, creating a yml.file that instructs Shippable on the details of running CI & completing a successful CI build.