com.cwctravel.hudson.plugins.suitegroupedtests.junit.db
Class JUnitDB

java.lang.Object
  extended by com.cwctravel.hudson.plugins.suitegroupedtests.junit.db.JUnitDB

public class JUnitDB
extends java.lang.Object


Constructor Summary
JUnitDB(java.lang.String databaseDir)
           
 
Method Summary
 JUnitMetricsInfo fetchTestCaseMetrics(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, java.lang.String caseName)
           
 java.util.List<JUnitTestInfo> fetchTestClassChildrenForBuild(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className)
           
 JUnitMetricsInfo fetchTestClassMetrics(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className)
           
 java.util.List<JUnitSummaryInfo> fetchTestPackageChildrenForBuild(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName)
           
 JUnitMetricsInfo fetchTestPackageMetrics(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName)
           
 java.util.List<JUnitSummaryInfo> fetchTestProjectChildrenForBuild(int buildNumber, java.lang.String projectName)
           
 JUnitMetricsInfo fetchTestProjectMetrics(int buildNumber, java.lang.String projectName)
           
 java.util.List<JUnitSummaryInfo> fetchTestSuiteChildrenForBuild(int buildNumber, java.lang.String projectName, java.lang.String suiteName)
           
 JUnitMetricsInfo fetchTestSuiteMetrics(int buildNumber, java.lang.String projectName, java.lang.String suiteName)
           
 java.util.List<JUnitTestInfo> filterTestsByDateRange(java.util.List<JUnitTestInfo> tests, long startDate, long endDate)
           
 java.util.List<JUnitTestInfo> getTestCaseHistory(java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, java.lang.String caseName)
           
 void insertTest(JUnitTestInfo test)
           
 void insertTests(java.util.List<JUnitTestInfo> tests)
           
static void main(java.lang.String[] args)
           
 JUnitTestInfo queryTestCase(java.lang.String projectName, java.lang.String buildId, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, java.lang.String caseName)
           
 JUnitTestInfo queryTestCaseForBuildPriorTo(java.lang.String projectName, int buildNumber, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, java.lang.String caseName)
           
 java.util.List<JUnitTestInfo> queryTestsByClass(java.lang.String projectName, java.lang.String buildId, java.lang.String suiteName, java.lang.String packageName, java.lang.String className)
           
 java.util.List<JUnitTestInfo> queryTestsByPackage(java.lang.String projectName, java.lang.String buildId, java.lang.String suiteName, java.lang.String packageName)
           
 java.util.List<JUnitTestInfo> queryTestsByProject(java.lang.String projectName, java.lang.String buildId)
           
 java.util.List<JUnitTestInfo> queryTestsBySuite(java.lang.String projectName, java.lang.String buildId, java.lang.String suiteName)
           
 JUnitTestDetailInfo readTestDetail(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, java.lang.String caseName, ReaderWriter stdoutReaderWriter, ReaderWriter stderrReaderWriter)
           
 JUnitSummaryInfo summarizeTestCaseForBuild(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, java.lang.String caseName)
           
 JUnitSummaryInfo summarizeTestCaseForBuildPriorTo(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, java.lang.String caseName)
           
 java.util.List<JUnitSummaryInfo> summarizeTestCaseHistory(java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, java.lang.String caseName, int limit)
           
 JUnitSummaryInfo summarizeTestClassForBuild(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className)
           
 JUnitSummaryInfo summarizeTestClassForBuildPriorTo(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className)
           
 java.util.List<JUnitSummaryInfo> summarizeTestClassHistory(java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, java.lang.String className, int limit)
           
 JUnitSummaryInfo summarizeTestPackageForBuild(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName)
           
 JUnitSummaryInfo summarizeTestPackageForBuildPriorTo(int buildNumber, java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName)
           
 java.util.List<JUnitSummaryInfo> summarizeTestPackageHistory(java.lang.String projectName, java.lang.String suiteName, java.lang.String packageName, int limit)
           
 JUnitSummaryInfo summarizeTestProjectForBuild(int buildNumber, java.lang.String projectName)
           
 JUnitSummaryInfo summarizeTestProjectForBuildNoLaterThan(int buildNumber, java.lang.String projectName)
           
 JUnitSummaryInfo summarizeTestProjectForBuildPriorTo(int buildNumber, java.lang.String projectName)
           
 java.util.List<JUnitSummaryInfo> summarizeTestProjectHistory(java.lang.String projectName, int limit)
           
 JUnitSummaryInfo summarizeTestSuiteForBuild(int buildNumber, java.lang.String projectName, java.lang.String suiteName)
           
 JUnitSummaryInfo summarizeTestSuiteForBuildNoLaterThan(int buildNumber, java.lang.String projectName, java.lang.String suiteName)
           
 JUnitSummaryInfo summarizeTestSuiteForBuildPriorTo(int buildNumber, java.lang.String projectName, java.lang.String suiteName)
           
 java.util.List<JUnitSummaryInfo> summarizeTestSuiteHistory(java.lang.String projectName, java.lang.String suiteName, int limit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitDB

public JUnitDB(java.lang.String databaseDir)
        throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

insertTest

public void insertTest(JUnitTestInfo test)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

insertTests

public void insertTests(java.util.List<JUnitTestInfo> tests)
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

queryTestsByProject

public java.util.List<JUnitTestInfo> queryTestsByProject(java.lang.String projectName,
                                                         java.lang.String buildId)
                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

queryTestsBySuite

public java.util.List<JUnitTestInfo> queryTestsBySuite(java.lang.String projectName,
                                                       java.lang.String buildId,
                                                       java.lang.String suiteName)
                                                throws java.sql.SQLException
Throws:
java.sql.SQLException

queryTestsByPackage

public java.util.List<JUnitTestInfo> queryTestsByPackage(java.lang.String projectName,
                                                         java.lang.String buildId,
                                                         java.lang.String suiteName,
                                                         java.lang.String packageName)
                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

queryTestsByClass

public java.util.List<JUnitTestInfo> queryTestsByClass(java.lang.String projectName,
                                                       java.lang.String buildId,
                                                       java.lang.String suiteName,
                                                       java.lang.String packageName,
                                                       java.lang.String className)
                                                throws java.sql.SQLException
Throws:
java.sql.SQLException

queryTestCase

public JUnitTestInfo queryTestCase(java.lang.String projectName,
                                   java.lang.String buildId,
                                   java.lang.String suiteName,
                                   java.lang.String packageName,
                                   java.lang.String className,
                                   java.lang.String caseName)
                            throws java.sql.SQLException
Throws:
java.sql.SQLException

queryTestCaseForBuildPriorTo

public JUnitTestInfo queryTestCaseForBuildPriorTo(java.lang.String projectName,
                                                  int buildNumber,
                                                  java.lang.String suiteName,
                                                  java.lang.String packageName,
                                                  java.lang.String className,
                                                  java.lang.String caseName)
                                           throws java.sql.SQLException
Throws:
java.sql.SQLException

getTestCaseHistory

public java.util.List<JUnitTestInfo> getTestCaseHistory(java.lang.String projectName,
                                                        java.lang.String suiteName,
                                                        java.lang.String packageName,
                                                        java.lang.String className,
                                                        java.lang.String caseName)
                                                 throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestCaseHistory

public java.util.List<JUnitSummaryInfo> summarizeTestCaseHistory(java.lang.String projectName,
                                                                 java.lang.String suiteName,
                                                                 java.lang.String packageName,
                                                                 java.lang.String className,
                                                                 java.lang.String caseName,
                                                                 int limit)
                                                          throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestCaseForBuild

public JUnitSummaryInfo summarizeTestCaseForBuild(int buildNumber,
                                                  java.lang.String projectName,
                                                  java.lang.String suiteName,
                                                  java.lang.String packageName,
                                                  java.lang.String className,
                                                  java.lang.String caseName)
                                           throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestCaseForBuildPriorTo

public JUnitSummaryInfo summarizeTestCaseForBuildPriorTo(int buildNumber,
                                                         java.lang.String projectName,
                                                         java.lang.String suiteName,
                                                         java.lang.String packageName,
                                                         java.lang.String className,
                                                         java.lang.String caseName)
                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestClassHistory

public java.util.List<JUnitSummaryInfo> summarizeTestClassHistory(java.lang.String projectName,
                                                                  java.lang.String suiteName,
                                                                  java.lang.String packageName,
                                                                  java.lang.String className,
                                                                  int limit)
                                                           throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchTestClassChildrenForBuild

public java.util.List<JUnitTestInfo> fetchTestClassChildrenForBuild(int buildNumber,
                                                                    java.lang.String projectName,
                                                                    java.lang.String suiteName,
                                                                    java.lang.String packageName,
                                                                    java.lang.String className)
                                                             throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestClassForBuild

public JUnitSummaryInfo summarizeTestClassForBuild(int buildNumber,
                                                   java.lang.String projectName,
                                                   java.lang.String suiteName,
                                                   java.lang.String packageName,
                                                   java.lang.String className)
                                            throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestClassForBuildPriorTo

public JUnitSummaryInfo summarizeTestClassForBuildPriorTo(int buildNumber,
                                                          java.lang.String projectName,
                                                          java.lang.String suiteName,
                                                          java.lang.String packageName,
                                                          java.lang.String className)
                                                   throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestPackageHistory

public java.util.List<JUnitSummaryInfo> summarizeTestPackageHistory(java.lang.String projectName,
                                                                    java.lang.String suiteName,
                                                                    java.lang.String packageName,
                                                                    int limit)
                                                             throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchTestPackageChildrenForBuild

public java.util.List<JUnitSummaryInfo> fetchTestPackageChildrenForBuild(int buildNumber,
                                                                         java.lang.String projectName,
                                                                         java.lang.String suiteName,
                                                                         java.lang.String packageName)
                                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestPackageForBuild

public JUnitSummaryInfo summarizeTestPackageForBuild(int buildNumber,
                                                     java.lang.String projectName,
                                                     java.lang.String suiteName,
                                                     java.lang.String packageName)
                                              throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestPackageForBuildPriorTo

public JUnitSummaryInfo summarizeTestPackageForBuildPriorTo(int buildNumber,
                                                            java.lang.String projectName,
                                                            java.lang.String suiteName,
                                                            java.lang.String packageName)
                                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestSuiteHistory

public java.util.List<JUnitSummaryInfo> summarizeTestSuiteHistory(java.lang.String projectName,
                                                                  java.lang.String suiteName,
                                                                  int limit)
                                                           throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchTestSuiteChildrenForBuild

public java.util.List<JUnitSummaryInfo> fetchTestSuiteChildrenForBuild(int buildNumber,
                                                                       java.lang.String projectName,
                                                                       java.lang.String suiteName)
                                                                throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestSuiteForBuild

public JUnitSummaryInfo summarizeTestSuiteForBuild(int buildNumber,
                                                   java.lang.String projectName,
                                                   java.lang.String suiteName)
                                            throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestSuiteForBuildPriorTo

public JUnitSummaryInfo summarizeTestSuiteForBuildPriorTo(int buildNumber,
                                                          java.lang.String projectName,
                                                          java.lang.String suiteName)
                                                   throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestSuiteForBuildNoLaterThan

public JUnitSummaryInfo summarizeTestSuiteForBuildNoLaterThan(int buildNumber,
                                                              java.lang.String projectName,
                                                              java.lang.String suiteName)
                                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestProjectHistory

public java.util.List<JUnitSummaryInfo> summarizeTestProjectHistory(java.lang.String projectName,
                                                                    int limit)
                                                             throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchTestProjectChildrenForBuild

public java.util.List<JUnitSummaryInfo> fetchTestProjectChildrenForBuild(int buildNumber,
                                                                         java.lang.String projectName)
                                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestProjectForBuild

public JUnitSummaryInfo summarizeTestProjectForBuild(int buildNumber,
                                                     java.lang.String projectName)
                                              throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestProjectForBuildPriorTo

public JUnitSummaryInfo summarizeTestProjectForBuildPriorTo(int buildNumber,
                                                            java.lang.String projectName)
                                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

summarizeTestProjectForBuildNoLaterThan

public JUnitSummaryInfo summarizeTestProjectForBuildNoLaterThan(int buildNumber,
                                                                java.lang.String projectName)
                                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

filterTestsByDateRange

public java.util.List<JUnitTestInfo> filterTestsByDateRange(java.util.List<JUnitTestInfo> tests,
                                                            long startDate,
                                                            long endDate)

readTestDetail

public JUnitTestDetailInfo readTestDetail(int buildNumber,
                                          java.lang.String projectName,
                                          java.lang.String suiteName,
                                          java.lang.String packageName,
                                          java.lang.String className,
                                          java.lang.String caseName,
                                          ReaderWriter stdoutReaderWriter,
                                          ReaderWriter stderrReaderWriter)
                                   throws java.io.IOException,
                                          java.sql.SQLException
Throws:
java.io.IOException
java.sql.SQLException

fetchTestCaseMetrics

public JUnitMetricsInfo fetchTestCaseMetrics(int buildNumber,
                                             java.lang.String projectName,
                                             java.lang.String suiteName,
                                             java.lang.String packageName,
                                             java.lang.String className,
                                             java.lang.String caseName)
                                      throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchTestClassMetrics

public JUnitMetricsInfo fetchTestClassMetrics(int buildNumber,
                                              java.lang.String projectName,
                                              java.lang.String suiteName,
                                              java.lang.String packageName,
                                              java.lang.String className)
                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchTestPackageMetrics

public JUnitMetricsInfo fetchTestPackageMetrics(int buildNumber,
                                                java.lang.String projectName,
                                                java.lang.String suiteName,
                                                java.lang.String packageName)
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchTestSuiteMetrics

public JUnitMetricsInfo fetchTestSuiteMetrics(int buildNumber,
                                              java.lang.String projectName,
                                              java.lang.String suiteName)
                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchTestProjectMetrics

public JUnitMetricsInfo fetchTestProjectMetrics(int buildNumber,
                                                java.lang.String projectName)
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2004-2012. All Rights Reserved.