My current project is hosted in Visual Studio Online. With each build I can see what my code coverage is.
However, I would like to write a build task that would fail the build or provide a warning if the code-coverage decreases when compared to the previous build.
Does VSO offer this kind of information? Can anyone point me in the right direction or is what I'm asking currently not possible with VSO?
Right now there is no built-in action, task or script which does this. It should be possible to request the previous successful build from a custom task and compare the values though...
Visualizing the trend can be achieved through the SonarQube integration. Though it doesn't have a way yet to fail the build or issue a warning on a negative trend, it at least makes it very visible.
When combined with Git, it may be a bit harder though, as a single build definition can cover multiple branches, and "the previously successful build" may be a completely different version of the software you're building. Causing all kinds of false negatives.