We have a very large automation suite that takes a good bit of time to run. These are UI tests for a windows app, and we use LeanFT & NUnit. S it is not web we do not yet have any sort of parallel/grid solution up and running.
The whole suite has around 110 tests and all are ran on a single agent. Around 80% of the way, the test run randomly disconnects & we see this error
Error Details
Runtime Error
HP.LFT.SDK.GeneralLeanFtException: Channel was disconnected
at HP.LFT.SDK.Core.ClassModel.TestObjectExecuterBase.HandleReplayError(Int32 errorCode, IDictionary`2 data)
at HP.LFT.SDK.Core.Communication.CommunicationClient.HandleError(Action`2 onError, Int32 status, IDictionary`2 data)
at HP.LFT.SDK.Core.Communication.CommunicationClient.Send(String messageType, IDictionary`2 data, Action`2 onError)
at HP.LFT.SDK.Core.ClassModel.TestObjectExecuter.ExecuteMethod[TResult](String methodName, Object[] arguments)
at HP.LFT.SDK.Core.ClassModel.TestObjectBase.ExecuteMethod[TResult](String methodName, Object[] arguments)
at HP.LFT.SDK.OperationExecutionWrapper.ExecuteWithEventsInternally[T](ITestObject testObject, Object additionalInfo, Func`1 innerAction, MethodBase methodInfo, Boolean reportOnlyOnError, Object[] arguments)
at HP.LFT.SDK.OperationExecutionWrapper.ExecuteWithEvents[TR](Func`1 innerAction, Func`1 originalMethod, Boolean reportOnlyOnError, ITestObject testObject, Object additionalInfo)
at HP.LFT.SDK.UiObjectBase.get_IsVisible()
What might be the causes of a Runtime error in the middle of a test suite? Has anyone else experienced something similar when scaling up their test automation using this framework? Thanks!
Here is another stack trace, from the initial disconnect. this was found in the hpe.leanft.runtime log file
[2018-07-11 12:50:47.189] [INFO] ChannelHelper - Channel close. ChannelId:0
[2018-07-11 12:50:47.190] [INFO] ChannelHelper - _cleanPendingRequests: Called
[2018-07-11 12:50:47.195] [INFO] WSCommunicationChannel - _onClose : Disconnected from ws://localhost:53500
[2018-07-11 12:50:47.195] [INFO] LightWeight.Dispatcher - onDisconnect: disconnected from { target: 'LftRuntime' }
[2018-07-11 12:50:47.197] [INFO] LightWeight.Dispatcher - disconnected from NativeRuntime!
[2018-07-11 12:50:47.197] [INFO] LightWeight.Dispatcher - NativeRuntime is down!, exiting...
[2018-07-11 12:50:47.197] [INFO] LicenseManager - onBeforeClose: releasing license
[2018-07-11 12:50:47.198] [WARN] Engine.ChannelManager - Exception when sending to client Error TypeError: Cannot read property 'send' of null
at Object.send (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\leanft.common\lib\websocket_communication_channel.js:149:35)
at ChannelManagerBase.send (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\lightweight-engine-common\lib\channels-base.js:63:32)
at Dispatcher.send (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\dispatcher.js:175:40)
at LftLicenseManager.onBeforeClose (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\license_manager.js:151:32)
at C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\lightweight-engine-common\lib\dispatcher-base.js:44:20
at Array.map (native)
at DispatcherBase.notifyDispatcherEvent (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\lightweight-engine-common\lib\dispatcher-base.js:43:40)
at Dispatcher._closeProcess (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\dispatcher.js:257:37)
at Dispatcher.onLftRuntimeDown (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\dispatcher.js:249:14)
at Dispatcher.onDisconnect (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\dispatcher.js:126:18)
TypeError: Cannot read property 'send' of null
at Object.send (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\leanft.common\lib\websocket_communication_channel.js:149:35)
at ChannelManagerBase.send (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\lightweight-engine-common\lib\channels-base.js:63:32)
at Dispatcher.send (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\dispatcher.js:175:40)
at LftLicenseManager.onBeforeClose (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\license_manager.js:151:32)
at C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\lightweight-engine-common\lib\dispatcher-base.js:44:20
at Array.map (native)
at DispatcherBase.notifyDispatcherEvent (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\lightweight-engine-common\lib\dispatcher-base.js:43:40)
at Dispatcher._closeProcess (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\dispatcher.js:257:37)
at Dispatcher.onLftRuntimeDown (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\dispatcher.js:249:14)
at Dispatcher.onDisconnect (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\lib\dispatcher.js:126:18)
[2018-07-11 12:50:47.200] [INFO] LicenseManager - got disconnected from LftRuntime
[2018-07-11 12:50:47.200] [INFO] LicenseManager - marking license as invalid
[2018-07-11 12:50:47.201] [INFO] SessionManager - onClientDisconnected: eventInfo: { client: { target: 'LftRuntime' }, additionalInfo: {} }
[2018-07-11 12:50:47.203] [INFO] SessionManager - going to send session closes event
[2018-07-11 12:50:47.210] [INFO] ChannelHelper - Channel close. ChannelId:0
[2018-07-11 12:50:47.210] [INFO] ChannelHelper - _cleanPendingRequests: Called
[2018-07-11 12:50:47.212] [INFO] ChannelHelper - _cleanPendingRequests: Still have pending requests going to notify an error
[2018-07-11 12:50:47.213] [WARN] PackagesManager.ChannelManager - Error when sending to client Error { Error: Channel was disconnected
at Object.<anonymous> (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\leanft.common\lib\websocket_channel_helper.js:191:37)
at Array.forEach (native)
at Object._cleanPendingRequests (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\leanft.common\lib\websocket_channel_helper.js:185:29)
at Object._onClose (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\leanft.common\lib\websocket_channel_helper.js:212:14)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:191:7)
at WebSocket.cleanupWebsocketResources (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\ws\lib\WebSocket.js:950:8)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8) status: -602 }
Error: Channel was disconnected
at Object.<anonymous> (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\leanft.common\lib\websocket_channel_helper.js:191:37)
at Array.forEach (native)
at Object._cleanPendingRequests (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\leanft.common\lib\websocket_channel_helper.js:185:29)
at Object._onClose (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\leanft.common\lib\websocket_channel_helper.js:212:14)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:191:7)
at WebSocket.cleanupWebsocketResources (C:\Program Files (x86)\HPE\LeanFT\LWE\lightweight-engine\node_modules\ws\lib\WebSocket.js:950:8)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
[2018-07-11 12:50:47.213] [INFO] WSCommunicationChannel - _onClose : Disconnected from ws://localhost:53500
[2018-07-11 12:50:47.214] [INFO] Dispatcher - onDisconnect: disconnected from { target: 'LftRuntime' }
[2018-07-11 12:50:47.216] [WARN] Engine.ChannelManager - send: received error from: PackageManager_1
In addition i see several hundreds of these right before i get the log above
[2018-07-11 12:50:29.173] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:31.755] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:32.686] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:33.605] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:33.765] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:33.976] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:34.234] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:34.494] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:37.769] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:38.127] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:38.373] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:38.769] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:39.115] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:41.231] [ERROR] PackageManager - executeCommandInner: top test object has no cookie
[2018-07-11 12:50:42.048] [ERROR] PackageManager - executeCommandInner: top test object has no cookie