Target Group » Developers Target Group » Testers Target Group » Software Managers
Conquering Branch-Based Development with Teamscale
 

On our mission to support development teams improving their products’ software quality, we strive to support their development process the best we can.

To do this, Teamscale has always analyzed every commit on the mainline in the repository for potential problems. However, recently many teams (including ourselves) have switched from a single development line to a branched based development approach (e.g., git flow, merge requests or manual Subversion/Team Foundation Server branches). In these models, the actual development usually happens on one or multiple branches and the mainline consists (mostly) of merge commits. Because only the final merge commit was analyzed after the feature’s development had ended, we could no longer give the developer near real-time feedback on their work.

To support this style of development we made branches a first class citizen in Teamscale 3.0. It can now analyze every commit on every branch, restoring our idea of rapid feedback for the branch-based model.

In this post, I will present how branch support looks like in Teamscale and how developers can work with it to create the best code possible.

 

Branch Support in Teamscale

Branches have been added to Teamscale as a first class citizen. Before we added branch support, some teams used multiple projects for different branches as a workaround for this problem. This is no longer necessary and greatly reduces the hardware and storage requirements, as a lot of redundant analysis is avoided. If a project has been analyzed with activated branch support, the branch can be chosen next to the project selection:

The new branch chooser

This chooser is available on perspectives that support branch selection, allowing easy navigation between different branches.

Activity Perspective in Detail

The most visible change has occured in the Activity perspective. It will now show you all commits on the current branch including merges and where they came from:

The new activity perspective showing a branch that is merged back

The branch chooser is available on almost all perspectives, allowing you to view dashboard data, metrics or findings specific to the selected branch.

IDE Support

To support you on your mission for the cleanest possible code, we also built branch support into our IDE plugins. It is currently available for the Eclipse, Visual Studio and IntelliJ Plugins. The Eclipse and IntelliJ plugins will automatically detect the branch you are currently working on and use this to retrieve findings from the server. This way you get to see all the latest findings without manually having to change anything in the configuration. Now you can finally fix the findings you introduced before they are merged, leaving you with a clean main line!

The Eclipse Plugin now automatically detects the correct branch

Support for Git, Team Foundation Server and Subversion

Teamscale supports the analysis of branches for Git, Team Foundation Server and Subversion.

Branch include/exclude configuration

Beware that analyzing many branches in Team Foundation Server and Subversion can be very expensive, as many lookups need to be made in the repository to retrieve the necessary information. Therefore, setting up your branch include/exclude patterns to what you really need is a vital step for a fast analysis.

Summary

Branch support was a massive undertaking for the entire team, probably the biggest change we have ever done. Now that it is done, it turned out surprisingly small and easy to use from the user’s perspective. We hope you will enjoy this great new feature.

If you want to see Teamscale in action, you can try Teamscale by downloading the free demo today or visiting our online demo instance.

Let me know what you think, and which big features we should tackle next, in the comments below!