class %IPM.ResourceProcessor.Test
extends %IPM.ResourceProcessor.Abstract
parameter ATTRIBUTES = "Phase,Package,Class,ManagerClass,Format,ExportFlags";
Comma-separated list of resource attribute names that this processor uses
parameter DESCRIPTION = "Loads unit tests (extending %UnitTest.TestCase) from the specified directory and runs them during (Phase). For modules in development mode, the unit tests are always loaded and are not deleted after they are run.";
Description of resource processor class (shown in UI)
property Class
as %String(MAXLEN=255);
Class containing unit tests - this will be mapped properly on development systems, and unit tests won't be deleted in the "test" phase
property ExportFlags
as %String(MAXLEN="");
Flags/qualifiers to export items with.
property Format
as %String(VALUELIST=",UDL,XML");
Export format
property ManagerClass
as %Dictionary.Classname [ InitialExpression = "%IPM.Test.Manager" ];
Class extending %UnitTest.Manager to use to run unit tests
property Package
as %String(MAXLEN=255);
Package containing unit tests - this will be mapped properly on development systems, and unit tests won't be deleted in the "test" phase if any classes in it exist.
property Phase
as %IPM.DataType.ListOfOptions(VALUELIST=",test,verify") [ InitialExpression = $ListBuild("test"),Required ];
Phase in which the unit tests run - "test" (dev namespace), "verify" (separate, clean namespace), or "test,verify" (to run in both cases).
method ExtensionGet()
as %String
This is a Get accessor method for the Extension property.
method GetSourceControlInfo(Output pInfo As %IPM.ExtensionBase.SourceControl.ResourceInfo)
as %Status
method OnAfterPhase(pPhase As %String, ByRef pParams)
as %Status
method OnExportItem(pFullExportPath As %String, pItemName As %String, ByRef pItemParams, ByRef pParams, Output pItemHandled As %Boolean = 0)
as %Status
method OnGetUniqueName(Output pUniqueName)
Returns a unique name for this resource.
Default implementation, leaving pUniqueName undefined, reverts to default behavior.
An empty string indicates guaranteed uniqueness (useful for folders relative to module root)
method OnItemRelativePath(pItemName As %String)
as %String
Returns the path relative to the module root for item pItemName within this resource.
method OnPhase(pPhase As %String, ByRef pParams, Output pResourceHandled As %Boolean = 0)
as %Status
Called as phase pPhase is executed for the resource. If pResourceHandled is set to true,
then the default behavior for that resource will be bypassed in the current phase.
Currently, this is only used in the Verify phase, because of different handling of intermediate error statuses.
TODO: Implement for standard database resources (.INC, .CLS, etc.)
method OnResolveChildren(ByRef pResourceArray)
as %Status
method TestsShouldRun(pPhase As %String, ByRef pParams)
as %Boolean