View Issue Details

IDProjectCategoryView StatusLast Update
0004717Compliance Test Tool (CTT) Unified Architecture1 - Script Issuepublic2019-04-05 14:48
ReporterMircea Suciu Assigned ToPaul Hunkar  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
PlatformWindowsOSWindows 7OS VersionProffesional
Product Version1.03.340.380 
Summary0004717: Float variable values that cannot be represented (binary) entirely but only approximated, produce errors on assertions in tests
Description

Given a float variable value that cannot be represented (binary) entirely but only approximated ex: 96.123456 that is approximated to 96.12345886230469.
The following test cases fail:
a) Monitored Item Services/Monitor Value Change/Test Cases/033.js
b) Monitored Item Services/Monitor Value Change/Test Cases/035.js

The above mentioned test cases fail due to a bug in the test case/test helper methods.

The initialValueOverride value is set to be equal to the aproximated value 95.12345886230469.
Later the follwoing assert is called and does not "hold" true due to the fact that item.Value.Value is 95.123:
Assert.True( ( initialValueOverride == item.Value.Value ), "Expected the item in the dataChange to contain the same value as was first read." );

The demonstration that this is a problem on the CTT side can be done by the attached Wireshark capture, that clearly shows that the value send to the server via WriteRequest (pckt 28) is equal to the one received in the data change notification (pckt 33), therefore the server side does not produce a loss of float value precision.

Steps To Reproduce

Write such a float value (ex: 96.123456) to a Float variable configured under the CTT's "Settings.ServerTest.NodeIds.Static.AllProfiles.Scalar" set of nodes.
Run the above mentioned tests.

Additional Information

A Wireshark capture of the situation is attached.

TagsNo tags attached.
Files Affected

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-04-04 10:37 Mircea Suciu New Issue
2019-04-05 14:48 Paul Hunkar Assigned To => Paul Hunkar
2019-04-05 14:48 Paul Hunkar Status new => resolved
2019-04-05 14:48 Paul Hunkar Resolution open => duplicate
2019-04-05 14:48 Paul Hunkar Status resolved => closed