Thursday, October 1, 2015

HipChat with Visual Studio Online and Jenkins

Introduction

In this article I'll talk about HipChat and how you can receive notifications from Jenkins and Visual Studio Online related to builds, work item creation, check-ins, etc.

What is HipChat

HipChat is a tool used for... chatting :) from every OS, Mac, Windows, iOS, Linux, from every place, from home, train, your friend's pool. It has a web and a desktop version. You can create a room and invite people from the same project to join the group. 



An interesting feature is that it has the possibility of integration with Jenkins and Visual Studio Online.
For example, we may have a job in Jenkins for selenium tests. When the job is finished, I want to receive a notification in Hipchat about the status of the job and I want to be able to go directly to Jenkins test results page. 
Another example, if my project is managed in Visual Studio Online, I want to be notified when a check in is performed or when a new bug is reported.
For being able to perform this integration, create an account in https://www.hipchat.com/ and download the desktop version from here https://www.hipchat.com/downloads
Open the desktop application, login, go to Lobby and Create a Room. Then you can invite people to join the room.



Jenkins and HitChat Integration

If you have a job in Jenkins and you want to receive notification in HitChat room when the job finishes (i.e. selenium tests job is failing), you need to add a Jenkins plugin: HitChat Plugin.
Then, on your job configuration you need to add a post-build step like in the image below, by providing the HitChat room token, id/name and to set the notification settings

How can you obtain the room id and token? Login with the admin account on https://www.hipchat.com and go to your room Summary and Token areas.






When the job finishes you and all members inside room, will get a notification in HitChat.




Visual Studio Online and HitChat Integration

Similar notifications can be received from Visual Studio Online, when you or anybody in the team adds new bugs, tasks, performs a check in, etc. What do you have to do? Go to you Visual Studio Account in the administration panel and open Service Hooks.



Select a HitChat service.



Then you need to trigger the notification event. In the image below you will trigger new bugs.



Finally, you need to set the token and room id, like you did for Jenkins.



In HitChat (desktop or web) you will be notified when a new bug is created.




Happy testing and... make it green, becomes a dream :).
For every post I'll recommend something to read. The link for today isMastering Jenkins

1 comment:

Popular Posts