View Issue Details

IDProjectCategoryView StatusLast Update
0010033CTT UA Scripts1 - Script Issuepublic2025-06-04 12:09
ReporterAlexander Allmendinger Assigned ToMichael Fehler  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Fixed in Version1.04.509 
Summary0010033: Implement basic utilities which can be used in companion spec scritps
Description

In companion specification test scripts there are many patterns which repeat for the different types and instance checks. Instead of developing them fresh for all companion specs these should become a common part of the CTT script library.

TagsNo tags attached.
Files Affected

/library/Information/InformationModelUtilities.js
/libmodel.xml

Activities

Paul Hunkar

2025-04-10 15:11

administrator   ~0022634

please provide more details in the issue about what the library will provide.

Michael Fehler

2025-06-04 09:11

developer   ~0022951

List of all functions of the InformationModelUtilities object:

GetNamespaceArrayLength()
-Gets the length of the Servers NamespaceArray and returns it

InitializeNamespaceIndex()
-Finds a NamespaceIndex in the NamespaceArray of the server and returns it

InitializeStandardVariables()
-Calls the InitializeItemStructure() method recursively to initialize the Base Type structure used for the tests

InitializeItemStructure()
-Recursive function to initialize a structure of MonitoredItems from a JSON pattern

FindReferencesVerifyingNamespaceIndex()
-Function calls FindAllReferences() of the ObjectModelHelper(),
but trying every NamespaceIndex in the NamespaceArray, if references could not
be found initially with the expected NamespaceIndex, printing a warning if they
could be found on an unexpected one instead.

FindAndInitializeAllNodesOfType()
-Scans the AddressSpace for Nodes of a certain Type and recursively initializes all children as JSON structure of MonitoredItems

FindInstancesOfType()
-Fuction uses FindObjectsOfTypeHelper() to find all Instances of any given Type

FetchAllSubtypesOfType()
-Fuction uses FindAllReferences() to search all Subtypes of any given Type

SetAllChildren_recursive()
-Function recursively browses and initializes all children of a node ( used by FindAndInitializeAllNodesOfType() )

VerifyElementsOfNode()
-Function to verify that a Node has certain references/attributes, that match the corresponding values of the 'Elements' object

OnlyOneElement()
-Function checks that only one Element of the OnlyOneChild array exists and calls VerifyElementsOfNode() to verify it.

VerifyAttributesOfNode()
-Function Verifies the Attributes of the given Node.

IsInTypeSystem()
-Checks if a node is within the Servers TypeSystem.

VerifyMethodArguments()
-Function to verify InputArguments and OutputArguments properties of a method.

InitializeInterfaceStructures()
-Function creates an array containing Objects, for all Instances/Types with an HasInterface Reference of args.Node.

CloneElements()
-Function clones the Elements object, used by VerifyElementsOfNode().

VerifyElementsOfInterface()
-Function calls SetInterfaceElements() and uses the modified Elements object to call VerifyElementsOfNode().

SetInterfaceElements()
-Function modifies the Elements object, based on the modellingRule of the corresponing Instance Type.

Paul Hunkar

2025-06-04 12:09

administrator   ~0022952

reviewed issue, agreed to changes, closed issue

Issue History

Date Modified Username Field Change
2024-11-23 11:27 Alexander Allmendinger New Issue
2024-11-23 17:21 Paul Hunkar Assigned To => Alexander Allmendinger
2024-11-23 17:21 Paul Hunkar Status new => assigned
2025-04-10 15:11 Paul Hunkar Note Added: 0022634
2025-06-02 13:22 Yannik Klaass Files Affected => /library/Information/InformationModelUtilities.js
/libmodel.xml
2025-06-04 08:42 Michael Fehler Status assigned => resolved
2025-06-04 08:59 Michael Fehler Status resolved => feedback
2025-06-04 08:59 Michael Fehler Resolution open => reopened
2025-06-04 09:11 Michael Fehler Assigned To Alexander Allmendinger => Michael Fehler
2025-06-04 09:11 Michael Fehler Status feedback => resolved
2025-06-04 09:11 Michael Fehler Resolution reopened => fixed
2025-06-04 09:11 Michael Fehler Note Added: 0022951
2025-06-04 12:08 Paul Hunkar Project CTT UA Test Case => CTT UA Scripts
2025-06-04 12:09 Paul Hunkar Status resolved => closed
2025-06-04 12:09 Paul Hunkar Fixed in Version => 1.04.509
2025-06-04 12:09 Paul Hunkar Note Added: 0022952