Home> Products> TeamCity> Features> Code Quality Maintenance

Code Quality


With TeamCity's numerous code quality features you can be sure your code base is being thoroughly tested from the project's start helping you develop high caliber software.

Duplicates and Inspections viewers enhancements

An improved viewer for browsing the discovered code duplicates and inspections allowing to filter the results by directories.

to the top

TeamCity has an unparalleled variation of means for maintaining code quality:

  • analysis of Java code covered by unit tests
  • search for duplicated pieces of code for Java and .NET projects
  • server-side code inspection of Java, JSP, JavaScript, CSS code (more than 600 IntelliJ IDEA's inspections are used)

Coverage

Measure the code coverage for your unit tests with EMMA, an open-source toolkit. TeamCity provides both summaries and detailed reports on code coverage. You can also download the code coverage results and analyze them in IntelliJ IDEA.

Open the screenshot in a new browser window

Open the screenshot in a new browser window

The coverage statistics is available for projects using Ant and Ipr build runners.

You can now track your projects' classes, blocks, lines and methods covered by the tests using the code coverage statistical graph.


Inspections

TeamCity uses a set of more than 600 IntelliJ IDEA inspections which you can use to analyze:

  • unused and unreachable code,
  • declaration redundancies,
  • performance issues,
  • dead code.

Check out the results of your code analysis in a browser, and then navigate to a particular string of code in the IDE where you can suppress or resolve the inspection results.

Code inspection is now available for Maven2 projects.

Maven Inspections

With statistical graphs you can now track the number of discovered errors and warnings.

Open the screenshot in a new browser window

Open the screenshot in a new browser window


Duplicates

Manually searching for code duplicates in big projects locally can take huge amounts of time, and it is almost impossible to constantly monitor the state of the code base.

Open the screenshot in a new browser window

Open the screenshot in a new browser window

TeamCity's solution is automated searching for code duplicates in .Net and Java code just like running a build. Select one of the Duplicates Finder runners and all of the integrated code is constantly checked for duplicates. The search is performed on a Build Agent and detailed reports are available in the web UI, where you can opt to show all or only newly discovered duplicates.

The Duplicates Finder for Java is powered by IntelliJ IDEA and will catch repetitive blocks of Java code in IntelliJ IDEA projects or projects being built by Maven2.

The .NET Duplicates Finder is based on ReSharper's capabilities and will catch similar code fragments of your C# and Visual Basic .NET code in Visual Studio 2003, 2005 and 2008 solutions. TeamCity 3.0 supports C# up to version 2.0 and covers Visual Basic .NET up to version 8.0.

A statistical graph allows you to track the number of duplicates discovered in your code.

Open the screenshot in a new browser window

Open the screenshot in a new browser window


Syntax highlighting in Duplicates viewer

The Duplicates Viewer now provides syntax highlighting.

Open the screenshot in a new browser window

Open the screenshot in a new browser window


Statistics

With statistical trends you can track the condition of your projects over time. The visual graphs include information about all the builds of a certain build configuration across all its history. You can:

  • Select time range for each type of statistics
  • Filter information by data series, for example, by Agent name or by result type
  • View average values
  • Filter out failed builds and show only the successful builds
  • View a build summary information and navigate to the build results page

Build Agents' Workload Statistics

More visual metrics, namely, statistics of Build Agents' activity and their usage during a particular time period are now available.

Open the screenshot in a new browser window

Open the screenshot in a new browser window


We are sure you'll find this feature helpful in:

  • your daily administration activities for lowering your company's network workload
  • finding and eliminating the gap between the most frequently used computers and those which are often idle
  • reducing the cost of your hardware resources ownership

"Time to fix tests" Statistics

A new type of statistical data display: time it took to fix the build's tests.

Time To Fix Tests Graph

Build Durations

Open the screenshot in a new browser window

Open the screenshot in a new browser window

Use this chart to monitor the duration of each build.


Success Rate

Open the screenshot in a new browser window

Open the screenshot in a new browser window

This chart tracks the build success rate over a selected period of time.


Per-test Duration

Open the screenshot in a new browser window

Open the screenshot in a new browser window

This specific chart shows how much time each particular test took.


Test Count

Open the screenshot in a new browser window

Open the screenshot in a new browser window

This chart displays the number of tests (JUnit, NUnit, TestNG) that the build passed, ignored, or failed.


Duplicates, Inspections, and Coverage Charts

Open the screenshot in a new browser window

Open the screenshot in a new browser window

For those build configurations which have duplicates, inspections or coverage enabled, you can analyze the trends in:

  • the amount of duplicated code
  • the number of errors and warning found
  • the number of unit tests

Artifacts Size

Open the screenshot in a new browser window

Open the screenshot in a new browser window

This chart lets you track how the size of the build artifacts has changed over time.