Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Ant build results, what do they actually mean

jcookems edited this page Jun 7, 2012 · 2 revisions

This section gives a quick overview about how to observe the development quality of the SDK.

Ant build script

All Ant build tasks can be found in the build.xml file in the project directory. This template is common in PHP community and you can find it here. Some tasks do analysis and other tasks collect the results and convert them into readable form. Tasks like phpcb just collect a couple of stats and display them in cleaner format.

To see the build results, you should first run complete build with unit tests following the instructions in the devbox installation guide.

Code coverage

The unit test code coverage results are stored in the build/coverage/index.html file. Use that file to browse the code along with its coverage percentages.

In the builde/coverage/index.dashboard.html file you can find more stats about the overall coverage:

  • Top project risks: code with least coverage.
  • Least test methods: shows lowest tested methods in the project.
  • Class coverage distribution: shows stats about coverage percentage in your project.
  • Class complexity.

Check Style

The code convention rules for the SDK can be found in the build/phpcs.xml folder. After running phpcs-ci task, results will appear in build/logs/checkstyle.xml. Any style errors must be fixed because they affect the PEAR guidelines. Style warnings should be fixed, but it is not required.

API documentation

This task generates HTML documentation for the SDK APIs. The files are created in the build\api folder.

Software metric analysis

Applies basic software metrics on the source code and reports any violations. For more information, see What is PHP_Depend. The analysis result is found in the build\pdepend folder.

Duplicate code analysis

Analyzes the code to detect if there are duplicate code segments. For more information, see PHPMD - PHP Mess Detector. Duplicate code result is found in the build\logs\pmd-cpd.xml file.

JDepend

Analyzes the object oriented structure and generate reports for:

  • Afferent Couplings
  • Efferent Couplings
  • Abstractness
  • Instability
  • Distance from the Main Sequence
  • Package Dependency Cycles

For more information about JDepend, see JDepend. The analysis result is found in this file build\logs\jdepend.xml

Violations

The violations acts as summary for all violations that code has from check style, duplicate code and PHP-Depend violations.

Test Results

Summarizes the unit test results and also groups the tests based on the packages. Checking for failed tests, successful tests and skipped tests is done from this report.

Code browser

A tool for browsing the code that includes some of the analysis tool summary. This tool highlights lines with check style errors, duplicate code, and more. The classes are displayed based on the @package tag for each class. The generated files can be found in build\code-browser.

Continuous Integration

You can setup Windows Azure SDK for PHP to use Jenkins as its CI server. For more information, see Jenkins.

Clone this wiki locally