/**
  * Constructs a Code-Coverage input instance.
  */
 public function __construct()
 {
     parent::__construct('Code Coverage', '04-code-coverage', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Percentage';
     $this->xAxisLabel = 'Build';
     $this->addRule(new phpucInputRule('Coverage', '/cruisecontrol/metrics/@eloc div /cruisecontrol/coverage/project/file/line[@count != 0]', self::MODE_VALUE));
 }
Ejemplo n.º 2
0
 /**
  * Constructs a new unit test input object.
  */
 public function __construct()
 {
     parent::__construct('JMeter', 'jmeter', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = '';
     $this->xAxisLabel = '';
     $this->addRule(new phpucInputRule('Time', '//testResults/sampleResult/@time', self::MODE_COUNT));
 }
 /**
  * Constructs a duplicate-code input instance.
  */
 public function __construct()
 {
     parent::__construct('Duplicated Code', '09-duplicate-code', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Duplications';
     $this->xAxisLabel = 'Build ';
     $this->addRule(new phpucInputRule('Lines', '/cruisecontrol/pmd-cpd/duplication/@lines', self::MODE_SUM));
     $this->addRule(new phpucInputRule('Tokens', '/cruisecontrol/pmd-cpd/duplication/@tokens', self::MODE_SUM));
 }
Ejemplo n.º 4
0
 /**
  * Constructs a new unit coverage input object.
  */
 public function __construct()
 {
     parent::__construct('Executable Lines of Code', '06-executable-lines-coverage', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Lines';
     $this->xAxisLabel = 'Build ';
     $this->addRule(new phpucInputRule('Executable', '/cruisecontrol/coverage/project/file/line', self::MODE_COUNT));
     $this->addRule(new phpucInputRule('Covered', '/cruisecontrol/coverage/project/file/line[@count != 0]', self::MODE_COUNT));
 }
Ejemplo n.º 5
0
 /**
  * Constructs a new unit test input object.
  */
 public function __construct()
 {
     parent::__construct('Unit Tests', '05-unit-tests', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Tests';
     $this->xAxisLabel = 'Build ';
     $this->addRule(new phpucInputRule('Total', '/cruisecontrol/testsuites//testcase', self::MODE_COUNT));
     $this->addRule(new phpucInputRule('Failures', '/cruisecontrol/testsuites//testcase[failure]', self::MODE_COUNT));
 }
 /**
  * Constructs a LOC/CLOC input instance.
  */
 public function __construct()
 {
     parent::__construct('Lines of Code', '07-lines-of-code', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Lines';
     $this->xAxisLabel = 'Build ';
     $this->addRule(new phpucInputRule('Lines of Code', '/cruisecontrol/metrics/@loc', self::MODE_VALUE));
     $this->addRule(new phpucInputRule('Comments', '/cruisecontrol/metrics/@cloc', self::MODE_VALUE));
 }
Ejemplo n.º 7
0
 /**
  * Constructs a Number of Classes input instance.
  */
 public function __construct()
 {
     parent::__construct('Number of Classes', '08-number-of-classes', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Classes';
     $this->xAxisLabel = 'Build ';
     $this->addRule(new phpucInputRule('Number of Classes', '/cruisecontrol/metrics/@noc', self::MODE_VALUE));
     $this->addRule(new phpucInputRule('Number of Interfaces', '/cruisecontrol/metrics/@noi', self::MODE_VALUE));
 }
Ejemplo n.º 8
0
 /**
  * Constructs a build breakdown input instance.
  */
 public function __construct()
 {
     parent::__construct('Breakdown of Build Types', '01-breakdown-of-build-types', phpucChartI::TYPE_PIE);
     $this->addRule(new phpucInputRule('builddate', '/cruisecontrol/info/property[@name = "builddate"]/@value', self::MODE_VALUE));
     $this->addRule(new phpucInputRule('builddate_error', '/cruisecontrol[
                  build/@error
              ]/info/property[
                  @name = "builddate"
              ]/@value', self::MODE_VALUE));
 }
Ejemplo n.º 9
0
 /**
  * Constructs a new unit coverage input object.
  */
 public function __construct()
 {
     parent::__construct('Test to Code Ratio', '06-test-to-code-ratio', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Classes / Methods';
     $this->xAxisLabel = 'Build ';
     $this->addRule(new phpucInputRule('Classes', '/cruisecontrol/coverage/project/file/class', self::MODE_COUNT));
     $this->addRule(new phpucInputRule('Methods', '/cruisecontrol/coverage/project/file/line[@type="method"]', self::MODE_COUNT));
     $this->addRule(new phpucInputRule('Test Classes', '/cruisecontrol/testsuites//testsuite[testcase]', self::MODE_COUNT));
     $this->addRule(new phpucInputRule('Test Methods', '/cruisecontrol/testsuites//testsuite/testcase', self::MODE_COUNT));
 }
Ejemplo n.º 10
0
 /**
  * Constructs a build timeline input instance.
  */
 public function __construct()
 {
     parent::__construct('Breakdown of Build Timeline', '02-breakdown-of-build-timeline', phpucChartI::TYPE_DOT);
     $this->yAxisLabel = 'Time';
     $this->xAxisLabel = 'Date ';
     $this->addRule(new phpucInputRule('builddate', '/cruisecontrol/info[1]/property[@name = "builddate"]/@value', self::MODE_VALUE));
     $this->addRule(new phpucInputRule('builddate_error', '/cruisecontrol[
                  build/@error
              ]/info[1]/property[
                  @name = "builddate"
              ]/@value', self::MODE_VALUE));
 }
Ejemplo n.º 11
0
 /**
  * Constructs a build at revision timeline input instance.
  */
 public function __construct()
 {
     parent::__construct('Build at Revision Timeline', '03-build-at-revision-timeline', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Build';
     $this->xAxisLabel = 'Revision';
     $this->graphDims = array('width' => 390, 'height' => 250);
     $this->addRule(new phpucInputRule('revision', '/cruisecontrol/modifications/modification/revision', self::MODE_LIST));
     $this->addRule(new phpucInputRule('build', '/cruisecontrol/info[1]/property[@name = "label"]/@value', self::MODE_VALUE));
     $this->addRule(new phpucInputRule('build_error', '/cruisecontrol[
                  build/@error
              ]/info[1]/property[
                  @name = "label"
              ]/@value', self::MODE_VALUE));
 }
 /**
  * Constructs a new unit coverage input object.
  */
 public function __construct()
 {
     parent::__construct('Coding Violations', '07-coding-violations', phpucChartI::TYPE_LINE);
     $this->yAxisLabel = 'Violations';
     $this->xAxisLabel = 'Build ';
     $this->addRule(new phpucInputRule('PHP CodeSniffer', '/cruisecontrol/checkstyle/file/error', self::MODE_COUNT));
     $this->addRule(new phpucInputRule('PHPMD', '/cruisecontrol/pmd/file/violation', self::MODE_COUNT));
     $this->addRule(new phpucInputRule('PHPDoc', '/cruisecontrol/build//target[
                @name="php-documentor"
              ]/task[
                @name="exec"
              ]/message[
                contains(text(), "WARNING in") or 
                contains(text(), "WARNING:") or 
                contains(text(), "ERROR in") or 
                contains(text(), "ERROR:")
              ]', self::MODE_COUNT));
 }
 /**
  * Constructs a new unit test execution time input object.
  */
 public function __construct()
 {
     parent::__construct('Test Execution Time', '08-test-execution-time', phpucChartI::TYPE_TIME);
     $this->addRule(new phpucInputRule('execution-time', '/cruisecontrol/testsuites/testsuite/@time', self::MODE_SUM));
 }