View Issue Details

IDProjectCategoryView StatusLast Update
0004790Compliance Test Tool (CTT) Unified Architecture1 - Script Issuepublic2019-09-13 15:10
ReporterV. Monfort Assigned ToAlexander Allmendinger  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinux 
Product Version1.03.341.389 
Target Version1.03.341.390Fixed in Version1.03.341.390 
Summary0004790: Test.Execute() unexpected error OR no Scalar found in Attribute Write / Subscription / Monitored Item tests (initialize, etc)
Description

All tests using function MonitoredItem.fromSettingsExt(...) with parameter "Settings: Settings.ServerTest.NodeIds.Static.AllProfiles.Scalar.Settings, Writable: true" will fail if the access level of the configured nodes are different than value "3" even if those nodes access level have the writable bit field (bit 1).

This is due to the incorrect behavior of "function filterSettings( args )" called by MonitoredItem.fromSettingsExt(...) :

  • read AccessLevel of retrieved nodes from settings
  • check if AccessLevel value == 3 to have writable nodes
    => 3 means only AccessLevel value with bit 0 and 1 are sets which means Read/Write bits sets only are accepted
    Whereas having an AccessLevel value != 3 does not means bit 1 (writable) is not set. For example value 99 is also acceptable and only indicates bit 5 and 6 are also set allowing to write Status and Timestamp.

See line 691 of library/Base/Objects/monitoredItem.js:
// let`s find the all the writable items
for( var i = 0; i < fS_items.length; i++ ) {
if( fS_items[i].Value.Value == 3 ) {
fS_filteredSettings.push( fS_items[i].NodeSetting );
}
}

At least the following tests have this issue:
Monitored Item Services/Monitor MinQueueSize_02/Test Cases/004.js
Monitored Item Services/Monitor MinQueueSize_02/Test Cases/005.js
Monitored Item Services/Monitor MinQueueSize_02/Test Cases/003.js
Monitored Item Services/Monitor MinQueueSize_02/Test Cases/009.js
Monitored Item Services/Monitor MinQueueSize_02/Test Cases/002.js
Monitored Item Services/Monitor MinQueueSize_10/Test Cases/003.js
Monitored Item Services/Monitor MinQueueSize_10/Test Cases/002.js
Monitored Item Services/Monitor MinQueueSize_05/Test Cases/initialize.js
Subscription Services/Subscription Transfer/Test Cases/004.js
Subscription Services/Subscription Minimum 05/Test Cases/Err-002.js
Subscription Services/Subscription Minimum 05/Test Cases/initialize.js
Subscription Services/Subscription Publish Min 10/Test Cases/Err-001.js
Subscription Services/Subscription Publish Min 10/Test Cases/001.js
Subscription Services/Subscription Publish Min 10/Test Cases/003.js
Subscription Services/Subscription Publish Min 10/Test Cases/002.js
Subscription Services/Subscription Minimum 02/Test Cases/initialize.js
Subscription Services/Subscription Minimum 10/Test Cases/initialize.js
Subscription Services/Subscription Publish Min 05/Test Cases/003.js
Subscription Services/Subscription Publish Min 05/Test Cases/initialize.js
Subscription Services/Subscription Minimum 1/Test Cases/initialize.js
Subscription Services/Subscription Basic/Test Cases/054.js
Subscription Services/Subscription Basic/Test Cases/initialize.js
Subscription Services/Subscription Basic/Test Cases/052.js
Attribute Services/Attribute Write StatusCode & TimeStamp/Test Cases/initialize.js
Attribute Services/Attribute Write Values/Test Cases/012.js
Attribute Services/Attribute Write Values/Test Cases/initialize.js
Attribute Services/Attribute Write Index/Test Cases/initialize.js

Steps To Reproduce

Define an access level with writable bit set but not equal to value 3 (bit 0 and 1 only), for example 99, for all values defined in settings "Server Test->Node Ids->Static->All profiles->Scalar" and in "Server Test->Node Ids->Static->All profiles->Array".

Run the test scripts indicated in description, observe different errors messages / skip case that have the same cause.

TagsNo tags attached.
Files Affected

Activities

Alexander Allmendinger

2019-09-02 07:53

developer   ~0010889

The script was using
if (AccessLevel == 3)
to determin whether the node is writable or not. Because the AccessLevel can be greater than 3 but the node is still writable, the function is now using a bitmask for AccessLevel CurrentReadOrWrite.
In addition the function is now checking the UserAccessLevel instead of the AccessLevel.

Paul Hunkar

2019-09-13 15:10

administrator   ~0010985

Reviewed In CTT Call

Issue History

Date Modified Username Field Change
2019-06-19 10:28 V. Monfort New Issue
2019-06-26 16:39 Paul Hunkar Assigned To => Alexander Allmendinger
2019-06-26 16:39 Paul Hunkar Status new => assigned
2019-09-02 07:53 Alexander Allmendinger Status assigned => resolved
2019-09-02 07:53 Alexander Allmendinger Resolution open => fixed
2019-09-02 07:53 Alexander Allmendinger Fixed in Version => 1.03.341.390
2019-09-02 07:53 Alexander Allmendinger Note Added: 0010889
2019-09-13 15:10 Paul Hunkar Target Version => 1.03.341.390
2019-09-13 15:10 Paul Hunkar Status resolved => closed
2019-09-13 15:10 Paul Hunkar Note Added: 0010985