View Issue Details

IDProjectCategoryView StatusLast Update
0005558CTT UA Scripts1 - Script Issuepublic2022-10-06 16:09
ReporterJochen Baier Assigned ToYannik Klaass  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.03.501 
Summary0005558: Assert.True() or Assert.False() without a 'message' parameter will not fail a test
Description

if Assert.True() or Assert.False() is called without the 'message' parameter the function will not call addError(). A test will not fail.

for example this test will never fail:

var is_equal= 42===43;
Assert.True(is_equal); //<-does nothing

searching for Assert.True() and Assert.False() in the library folder will return a handful of places where these functions are called without a message text.
for example:

*if( isDefined( args.ExpectedResults ) ) result = Assert.StatusCodeIs( args.ExpectedResults, args.StatusCode );
else Assert.True( args.StatusCode.isGood() );

*Assert.True( ActivateSessionHelper.Execute( { Session: Test.Session,
UserIdentityToken: UaUserIdentityToken.FromUserCredentials( {
Session: Test.Session,
UserCredentials: overrides } ) } ) );

TagsNo tags attached.
Files Affected

/library/Base/assertions.js
/library/Information/InfoFactory.js
/library/ServiceBased/AttributeServiceSet/HistoryRead/HAStructureHelpers.js
/maintree/Attribute Services/Attribute Write Values/Test Cases/005.js
/maintree/History/Historical Access Read Raw/Test Cases/Err-002.js
/maintree/History/Historical Access Read Raw/Test Cases/Err-003.js
/maintree/History/Historical Access Read Raw/Test Cases/Err-025.js
/maintree/Monitored Item Services/Monitor Items 10/Test Cases/003.js
/maintree/Security/Security Basic 256/Test Cases/001.js
/maintree/Security/Security Basic 256/Test Cases/002.js
/maintree/Subscription Services/Subscription Basic/Test Cases/002.js
/maintree/Subscription Services/Subscription Basic/Test Cases/Err-027.js
/maintree/View Services/View Basic/Test Cases/017.js

Activities

Yannik Klaass

2022-09-07 09:21

developer   ~0017535

Added standard messages for Assert.True() and Assert.False() and modified all found occurrences of calls without a message parameter to fit the according intention.

Paul Hunkar

2022-10-06 16:09

administrator   ~0017967

Reviewed changes in call, agreed to changes and closed issue

Issue History

Date Modified Username Field Change
2020-03-27 13:11 Jochen Baier New Issue
2020-04-10 16:05 Paul Hunkar Assigned To => Alexander Allmendinger
2020-04-10 16:05 Paul Hunkar Status new => assigned
2022-08-02 20:04 Paul Hunkar Project Compliance Test Tool (CTT) Unified Architecture => CTT UA Scripts
2022-09-07 09:21 Yannik Klaass Assigned To Alexander Allmendinger => Yannik Klaass
2022-09-07 09:21 Yannik Klaass Status assigned => resolved
2022-09-07 09:21 Yannik Klaass Resolution open => fixed
2022-09-07 09:21 Yannik Klaass Note Added: 0017535
2022-10-06 16:08 Paul Hunkar Files Affected => /library/Base/assertions.js
/library/Information/InfoFactory.js
/library/ServiceBased/AttributeServiceSet/HistoryRead/HAStructureHelpers.js
/maintree/Attribute Services/Attribute Write Values/Test Cases/005.js
/maintree/History/Historical Access Re...
2022-10-06 16:09 Paul Hunkar Status resolved => closed
2022-10-06 16:09 Paul Hunkar Fixed in Version => 1.03.501
2022-10-06 16:09 Paul Hunkar Note Added: 0017967