LeanFT - Running tests remotely results in random SocketClient Exceptions

耗尽温柔 提交于 2020-01-16 17:04:05

问题


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:

  1. Create the following directory: %localappdata%\Hewlett-Packard\LeanFT\LogConfigurations
  2. In that directory create a file named leanft.runtime.log.config.json
  3. 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
      }]
    }
    
  4. restart the engine

  5. reproduce the issue

And

  1. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!