Package com.eviware.soapui.model.support

Examples of com.eviware.soapui.model.support.ProjectMetrics


        inspectorPanel.addInspector(new GroovyEditorInspector(buildSaveScriptPanel(), "Save Script",
                "Script to run before saving the project"));
    }

    private void updateStatistics() {
        ProjectMetrics projectMetrics = new ProjectMetrics(getModelItem());

        metrics.setMetric("File Path", getModelItem().getPath());

        Set<String> newNames = new HashSet<String>();
        boolean rebuilt = false;
        for (Interface iface : getModelItem().getInterfaceList()) {
            if (!metrics.hasMetric(iface.getName())) {
                MetricsSection section = metrics.getSection("Interface Summary");
                buildInterfaceSummary(section.clear());
                rebuilt = true;
                break;
            }

            newNames.add(iface.getName());
            interfaceNameSet.remove(iface.getName());
        }

        if (!rebuilt) {
            if (!interfaceNameSet.isEmpty()) {
                MetricsSection section = metrics.getSection("Interface Summary");
                buildInterfaceSummary(section.clear());
            }

            interfaceNameSet = newNames;
        }

        metrics.setMetric(TESTSUITES_STATISTICS, getModelItem().getTestSuiteCount());

        metrics.setMetric(TESTCASES_STATISTICS, projectMetrics.getTestCaseCount());
        metrics.setMetric(TESTSTEPS_STATISTICS, projectMetrics.getTestStepCount());
        metrics.setMetric(ASSERTIONS_STATISTICS, projectMetrics.getAssertionCount());
        metrics.setMetric(LOADTESTS_STATISTICS, projectMetrics.getLoadTestCount());

        metrics.setMetric(MOCKSERVICES_STATISTICS, getModelItem().getMockServiceCount());
        metrics.setMetric(MOCKOPERATIONS_STATISTICS, projectMetrics.getMockOperationCount());
        metrics.setMetric(MOCKRESPONSES_STATISTICS, projectMetrics.getMockResponseCount());

        metrics.setMetric(REST_MOCKSERVICES_STATISTICS, getModelItem().getRestMockServiceCount());
        metrics.setMetric(REST_MOCKACTIONS_STATISTICS, projectMetrics.getRestMockActionCount());
        metrics.setMetric(REST_MOCKRESPONSES_STATISTICS, projectMetrics.getRestMockResponseCount());
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.support.ProjectMetrics

Copyright © 2018 www.massapicom. 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.