LeanFT-远程运行测试会导致随机SocketClient异常 [英] LeanFT - Running tests remotely results in random SocketClient Exceptions

查看:107
本文介绍了LeanFT-远程运行测试会导致随机SocketClient异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个大型的自动化测试套件,可将测试分为4组.这4个组在不同的远程计算机上运行.有时,测试将开始失败,并且我们收到以下错误消息

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?

推荐答案

client is not connected当多个任务正在运行完全相同的应用程序并且其中一个任务执行LeanFT断开连接(调用SDK.cleanup())时,通常会引发问题另一个任务仍然尝试查询AUT.

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. 创建以下目录:%localappdata%\ Hewlett-Packard \ LeanFT \ LogConfigurations
  2. 在该目录中创建一个名为leanft.runtime.log.config.json的文件
  3. 在文件中输入以下文本并保存:

  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
  }]
}

  • 重新启动引擎

  • restart the engine

    还有

    1. 检查日志以查看哪个步骤关闭了连接并修复并发问题.

    这篇关于LeanFT-远程运行测试会导致随机SocketClient异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆