问题
We have a large automated test suites that seperates test out into 4 groups. These 4 groups are ran on different remote machines. Occasionaly, tests will start to fail and we get the following error message
HP.LFT.Communication.SocketClient.CommunicationException : Send: client is not connected
This just happens out of no where and it causes all the tests afterwards to fail. Is there anyway to fix this issue?
回答1:
client is not connected
issues are often thrown when multiple tasks are operating the exact same app and one of the tasks does a LeanFT disconnect (call to SDK.cleanup()
) while another task still tries to query the AUT.
These issues do not have a one-off solution. They are generally fixed case by case and needs to be debugged in the context of the very execution.
In that direction, you can increase the already existent debug log levels by following the steps mentioned in this thread:
- Create the following directory: %localappdata%\Hewlett-Packard\LeanFT\LogConfigurations
- In that directory create a file named leanft.runtime.log.config.json
Enter the following text in the file and save it:
{ "levels": { "[all]": "trace" }, "appenders": [{ "type": "file", "absolute": true, "filename": "c:/hpe.leanft.runtime.log", "maxLogSize": 5242880, "backups": 5 }] }
restart the engine
- reproduce the issue
And
- Check the logs to see which step closed the connection and fix the concurrency issue.
来源:https://stackoverflow.com/questions/51108038/leanft-running-tests-remotely-results-in-random-socketclient-exceptions