PackageDescription: SUnit-Bridge2SU2


S Unit - Bridge 2 SU 2

Last published: April 5, 2013 by 'nross'

Defines 5 Classes
Extends 5 Classes


This package implements a tool to install a bridge between the SUnit and SUnitToo test environments such that XProgramming.SUnit tests may be run with the SUnitTools, respecting the original XProgramming.SUnit inheritance rules, without any changes to the tests. To run your test suite without any "phantom" changes to the test classes, make sure you load this package to deploy the Bridge before loading your test suite.

The Bridge is accomplished by replacing the two primary SUnit classes (TestCase and TestResource) with stripped versions whose purpose is simply to inherit from their counterparts in the SUnitToo class hierarchy. The Bridge classes are substituted for the original XProgramming.SUnit classes and then renamed back to their original names. This enables the SUnitTools to operate correctly while using the inheritance rules of the original SUnit environment, and without any changes to the existing tests.

Note that while this package is loaded, the bridge is deployed, and the original TestCase and TestResource classes in the SUnit package will be renamed BRIDGE2SUTestCase and BRIDGE2SUTestResource respectively.

If you load your tests before you load this package, phantom "No Conflict" changes will appear in all test classes that inherit directly from the original TestCase and TestResource classes. These artifacts are unavoidable due to the renaming mechanisms required to substitute the bridge's stripped classes for their original counterparts. However, publishing new versions of your test packages created while the bridge is deployed will not change the basic inheritance structure of the tests, since the fully qualified path of the superclass binding reference is exactly the same as when the bridge is not deployed. Deploying the Bridge only alters classes in the SUnit package, and that package should consequently not be published while the bridge is deployed. You can retract or deploy the bridge manually if necessary using the class methods #retractBridge and #deployBridge in SU2Bridge.

Publishing this package will first retract the bridge so it will publish cleanly. You will need to deploy it again manually after the publish is complete. (If RB windows were open during retraction, the VM method cash can sometimes require flushing to update all references and avoid DNUs when selecting packages with tests; closing windows and collecting garbage usually solves the problem.)