Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%IPM] >  [ResourceProcessor] >  [Test]
Private  Storage   

class %IPM.ResourceProcessor.Test extends %IPM.ResourceProcessor.Abstract

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 8 11


Summary

Properties
Class ExportFlags Format ManagerClass Package
Params Phase

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
ApplyDefaults ExtensionGet GetAttributeMetadata GetDescription
GetSourceControlInfo OnAfterPhase OnBeforeArtifact OnBeforePhase
OnExportItem OnGetStudioProject OnGetUniqueName OnItemRelativePath
OnPhase OnResolveChildren SatisfiesCondition SetParams
TestsShouldRun

Subclasses
%IPM.ResourceProcessor.UnitTest

Parameters

• 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)

Properties

• 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).

Methods

• 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


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.