org.kuali.rice.vc.test
Class WsdlCompareTestCase

java.lang.Object
  extended by org.kuali.rice.test.BaseRiceTestCase
      extended by org.kuali.rice.test.RiceTestCase
          extended by org.kuali.rice.test.RiceInternalSuiteDataTestCase
              extended by org.kuali.rice.test.BaseModuleTestCase
                  extended by org.kuali.rice.test.BaselineTestCase
                      extended by org.kuali.rice.vc.test.WsdlCompareTestCase
All Implemented Interfaces:
MethodAware
Direct Known Subclasses:
CoreWsdlCompatibilityTest, KenWsdlCompatibilityTest, KewWsdlCompatibilityTest, KimWsdlCompatibilityTest, KrmsWsdlCompatibilityTest, KsbWsdlCompatibilityTest, LocationWsdlCompatibilityTest

public abstract class WsdlCompareTestCase
extends BaselineTestCase


Nested Class Summary
protected static class WsdlCompareTestCase.MavenVersion
          Utility class for parsing and comparing maven versions
protected static class WsdlCompareTestCase.VersionCompatibilityBreakage
          struct-ish class to hold data about a VC breakage
static class WsdlCompareTestCase.VersionTransition
          A class representing a transition from one maven version to another
 
Nested classes/interfaces inherited from class org.kuali.rice.test.BaselineTestCase
BaselineTestCase.BaselineMode, BaselineTestCase.Mode
 
Field Summary
 
Fields inherited from class org.kuali.rice.test.BaselineTestCase
dirty
 
Fields inherited from class org.kuali.rice.test.BaseModuleTestCase
moduleName
 
Fields inherited from class org.kuali.rice.test.RiceTestCase
DEFAULT_TEST_HARNESS_SPRING_BEANS, failedSuiteTestName, perTestLifeCycles, SUITE_LIFE_CYCLES_FAILED, SUITE_LIFE_CYCLES_RAN, suiteLifeCycles
 
Fields inherited from class org.kuali.rice.test.BaseRiceTestCase
log, method
 
Constructor Summary
WsdlCompareTestCase(String moduleName)
           
 
Method Summary
protected  String buildBreakagesSummary(List<WsdlCompareTestCase.VersionCompatibilityBreakage> breakages)
           
protected  List<com.predic8.soamodel.Difference> compareWsdlDefinitions(String oldWsdl, String newWsdl)
           
protected  void compareWsdlFiles(File[] wsdlFiles)
           
protected  List<WsdlCompareTestCase.VersionTransition> generateVersionTransitions(WsdlCompareTestCase.MavenVersion currentVersion, List<WsdlCompareTestCase.MavenVersion> versions)
          calculate which version transitions to test given the current version, and the list of versions to consider.
protected  Lifecycle getLoadApplicationLifecycle()
           
protected  List<Lifecycle> getPerTestLifecycles()
           
 String getPreviousVersion()
           
protected  String getPreviousVersionWsdlUrl(String wsdlFile, WsdlCompareTestCase.MavenVersion previousVersion)
           
protected  List<Lifecycle> getSuiteLifecycles()
           
protected  List<WsdlCompareTestCase.MavenVersion> getVersionRange(WsdlCompareTestCase.MavenVersion lowestVersion, WsdlCompareTestCase.MavenVersion highestVersion)
          Returns the range of versions from previousVersion to currentVersion.
protected  Map<String,List<WsdlCompareTestCase.VersionTransition>> getWsdlVersionTransitionBlacklists()
          Allows an extending test to specify versions transitions of specific wsdls to omit from testing.
 void setPreviousVersion(String previousVersion)
           
protected  List<String> verifyWsdlDifferences(com.predic8.soamodel.Difference diff, String level)
           
 
Methods inherited from class org.kuali.rice.test.BaselineTestCase
getClearDbPerTestLifecycles, getMode, getPerTestTablesNotToClear, getPerTestTablesToClear, getRollbackClearDbPerTestLifecycles, getRollbackTestLifecycles, setUp
 
Methods inherited from class org.kuali.rice.test.BaseModuleTestCase
getModuleName
 
Methods inherited from class org.kuali.rice.test.RiceInternalSuiteDataTestCase
getKIMDataLoadOrderFile, getKIMSqlFileBaseLocation, getKRADDefaultSuiteTestData, loadSuiteTestData
 
Methods inherited from class org.kuali.rice.test.RiceTestCase
configureLogging, dumpMemory, getBaseDir, getConfigLocations, getFullTestName, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, loadPerTestData, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, setUpInternal, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles, tearDown
 
Methods inherited from class org.kuali.rice.test.BaseRiceTestCase
getName, getPerTestDataLoaderLifecycle, resetLogLevels, setLogLevel, setName, setTestMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsdlCompareTestCase

public WsdlCompareTestCase(String moduleName)
Method Detail

verifyWsdlDifferences

protected List<String> verifyWsdlDifferences(com.predic8.soamodel.Difference diff,
                                             String level)

compareWsdlDefinitions

protected List<com.predic8.soamodel.Difference> compareWsdlDefinitions(String oldWsdl,
                                                                       String newWsdl)

getPreviousVersionWsdlUrl

protected String getPreviousVersionWsdlUrl(String wsdlFile,
                                           WsdlCompareTestCase.MavenVersion previousVersion)

getWsdlVersionTransitionBlacklists

protected Map<String,List<WsdlCompareTestCase.VersionTransition>> getWsdlVersionTransitionBlacklists()
Allows an extending test to specify versions transitions of specific wsdls to omit from testing. This can be useful for ignoring version compatibility issues that have already been addressed in previously released versions.

Returns:
a Map from wsdl file name (e.g. "DocumentTypeService.wsdl") to a list of WsdlCompareTestCase.MavenVersions to filter

compareWsdlFiles

protected void compareWsdlFiles(File[] wsdlFiles)

generateVersionTransitions

protected List<WsdlCompareTestCase.VersionTransition> generateVersionTransitions(WsdlCompareTestCase.MavenVersion currentVersion,
                                                                                 List<WsdlCompareTestCase.MavenVersion> versions)
calculate which version transitions to test given the current version, and the list of versions to consider. The results should contain a transition from the closest preceeding patch version at each minor version included in the range to the nearest newer patch version within the current minor version. That is hard to understand, so an example is called for: 2.0.0, 2.0.1, 2.1.0, 2.0.2, 1.0.4, 2.1.1, 2.1.2, 2.2.0, 2.1.3, 2.2.1, 2.1.4, 2.2.2, 2.1.5, 2.2.3, So for the above version stream (which is sorted by time) the transitions for the range 1.0.4 to 2.2.3 would be: 1.0.4 -> 2.2.0, 2.1.2 -> 2.2.0, 2.1.3 -> 2.2.1, 2.1.4 -> 2.2.2, 2.1.5 -> 2.2.3,

Parameters:
currentVersion - the current version of Rice
versions - the versions to consider
Returns:
the calculated List of VersionTransitions

buildBreakagesSummary

protected String buildBreakagesSummary(List<WsdlCompareTestCase.VersionCompatibilityBreakage> breakages)

getPreviousVersion

public String getPreviousVersion()

setPreviousVersion

public void setPreviousVersion(String previousVersion)

getLoadApplicationLifecycle

protected Lifecycle getLoadApplicationLifecycle()
Overrides:
getLoadApplicationLifecycle in class RiceTestCase

getPerTestLifecycles

protected List<Lifecycle> getPerTestLifecycles()
Overrides:
getPerTestLifecycles in class BaselineTestCase

getSuiteLifecycles

protected List<Lifecycle> getSuiteLifecycles()
Overrides:
getSuiteLifecycles in class RiceTestCase

getVersionRange

protected List<WsdlCompareTestCase.MavenVersion> getVersionRange(WsdlCompareTestCase.MavenVersion lowestVersion,
                                                                 WsdlCompareTestCase.MavenVersion highestVersion)
Returns the range of versions from previousVersion to currentVersion. The versions will be in the numerical range, but will be sorted by timestamp. Note that if either of the given versions aren't in maven central, they won't be included in the results.

Parameters:
lowestVersion - the lowest version in the range
highestVersion - the highest version in the range
Returns:


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.