Examples of RcovResult


Examples of hudson.plugins.rubyMetrics.rcov.model.RcovResult

        return parse(new FileInputStream(file));
    }

    public RcovResult parse(InputStream input) throws IOException {
        try {
            RcovResult result = new RcovResult();

            Parser parser = initParser(getHtml(input));
            TableTag report = getReportTable(parser);

            if (report.getRowCount() > 0) {
                  //row at 0 is the header row, so we have to get the row at 1
                  TableRow totalRow = report.getRow(1);
                  TableColumn[] columns = totalRow.getColumns();

              result.setTotalLines(getTextFromTT(columns[1]));
              result.setCodeLines(getTextFromTT(columns[2]));
              result.setTotalCoverage(getTextFromTT(columns[3]));
              result.setCodeCoverage(getTextFromTT(columns[4]));

                  for (int i = 2; i < report.getRowCount(); i++) {
                      result.addFile(parseRow(report.getRow(i)));
                  }
            }

            return result;
        } catch (Exception e) {
View Full Code Here

Examples of hudson.plugins.rubyMetrics.rcov.model.RcovResult

        if (build.getResult() == Result.FAILURE) {
            return false;
        }

        RcovParser parser = new RcovParser(build.getRootDir());
        RcovResult results = parser.parse(getCoverageFiles(build, indexFilter)[0]);

        RcovBuildAction action = new RcovBuildAction(build, results, targets);
        build.getActions().add(action);

        if (failMetrics(results, listener)) {
View Full Code Here

Examples of hudson.plugins.rubyMetrics.rcov.model.RcovResult

        assertTrue(source.endsWith(end));
    }

    private void assertReportIsComplete(File root, InputStream input) throws Exception {
        RcovParser parser = new RcovParser(root);
        RcovResult result = parser.parse(input);

        assertNotNull(result);

        assertTrue(result.getFiles().size() > 0);

        assertIsAValidNode(result.getTotalCoverage());
        assertIsAValidNode(result.getTotalLines());
        assertIsAValidNode(result.getCodeCoverage());
        assertIsAValidNode(result.getCodeLines());

        //Check first file
        RcovFileResult fileResult = result.getFiles().iterator().next();

        assertIsAValidNode(fileResult.getTotalCoverage());
        assertIsAValidNode(fileResult.getTotalLines());
        assertIsAValidNode(fileResult.getCodeCoverage());
        assertIsAValidNode(fileResult.getCodeLines());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.