PackageDescription: RBSUnitShowResult


RBS Unit Show Result

Last published: June 16, 2017 by 'nross'

Defines 7 Classes
Extends 12 Classes


I prereq RBSUnitExtensions, so show the overall test suite result on the Refactoring Browser taskbar. I also display an icon showing the latest result of running each test against its method. I also add a page ('Testing') to the 'Tools' section of the VisualLauncher's settings. This page lets users set whatever test run behaviour they want (i.e. over and above the settings that drive my behaviour) by choosing which subclass of TestSuite and/or which subclass of TestResult test runs will use.

On load, I execute
XProgramming.SUnit.TestCase suiteClass:
(XProgramming.SUnit.PluggableSuite resultClass: XProgramming.SUnit.KeepLatestResult).
By using my settings page, or by re-executing the above, you may substitute any subclass of PluggableSuite to combine display of the latest results with other test run behaviours.

On unload, I execute
XProgramming.SUnit.TestCase suiteClass: XProgramming.SUnit.TestSuite.
to end capture of results, and
XProgramming.SUnit.TestCaseOutcomes flush.
to flush the results store. You may do either of these at any time while I am loaded. (Be aware, if you reset the suiteClass to TestSuite but do not flush the results, the Refactoring Browser will go on displaying the last result before you did for each test (i.e. until you do flush the cache, or else reset the suiteClass to capture results again, or else I am unloaded.)

The result for a test is updated when it is rerun, and flushed when its method is recompiled or unloaded. You may inspect
XProgramming.SUnit.TestCaseOutcomes current
to see the times taken to run specific tests; these are captured but not displayed individually at the moment, just the total time for the suite.

I prereq RBSUnitExtensions merely for simple convenience of loading, since users of me will almost always wish to run tests using RBSUnitExtensions. It can be unloaded, retaining me; any mechanism for running SUnit tests that uses a KeepLatestResult will cause me to display the results in the Refactoring Browser.