Jenkins‎ > ‎

Recommended C# setup

Todo: The text has been moved from jenkins. Rewrite article, add screenshots.

This page references

The project is Praqma C# Logger, which is part of Praqmas C# utilities. In order to be able to show what Jenkins CI is capable of we have made a separate solution file to build only this project. The Logger is a simple logger utility consisting of 10-15 .cs files plus a test project.

Jenkins builds the projects by running MS Build on the specified solution file. We make use of the NUnit framework for unit testing, and NCover for coverage measuring. Furthermore we use Microsoft FxCop for static code analysis to make sure we follow these guidelines.

The final link in the list below, Latest Test Result, will let you browse through the tests and show a graphic representation of failed/passed tests. Below on the right you will see a graph of tests in total and how many test that failed and when failed tests have been fixed. If a test fails Jenkins will help you locate the test. You can either browse as mentioned before, or you can click the build on the graph. For example you can look at build #15 you can see that TestUnregisterFunctions failed, and in build #16 it was fixed.

Code Coverage
To the left is a link called Code Coverage, which will take you to the full NCover report. This report lets you browse through all the files in the project at see a graphical representation of the coverage. In the right frame you will get a summary of the report with full project code coverage and top 5 uncovered items. On the left you can browse all the items in the project, which can help you locate a place in the code with low coverage.

Style Violations
Below the Test Result Tend graph is another graph. This will show you the number of violations to the FxCop rules over time. It is important to note that we have created a FxCop Rule project, where we were able to deselect certain rules. This way we can select just the rules we want to follow. By clicking the graph you can browse the files as you can with the tests (mentioned above). This time you will get a information on how many, and which, rules that have been violated by browsing to the separate files. For example you can select EasyLogger.cs which has 15 violations. Here you will be presented with a list of rules violated, where in the code the violation is and a text with help to fix the violation.
Note. In the graph displayed here, High means errors, Medium means warnings, and Low is only there because the graph is generic and can show three levels of errors if the tool supports it.