运行CodedUI方案时,自动化对等体仍保留在内存中 [英] Automation peers remain in memory while running the CodedUI scenario

查看:105
本文介绍了运行CodedUI方案时,自动化对等体仍保留在内存中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个CodedUI测试,它打开一个应用程序,为一个模块加载数据,然后移动到另一个模块。现在,第一个模块加载的数据未被使用。因此,为第一个模块加载的数据现在可用于垃圾收集。
然后测试强制垃圾收集。最后,作为测试的一部分,我想验证与第一个模块相关的数据是否未保存到内存中。

I am writing a CodedUI test which opens an application, loads data for one module and then move to the other module. Now the data loaded for the first module is not in use. Hence, the data loaded for the first module is now available for garbage collection. The test then forces garbage collection. In the end as part of the test, I want to verify that the data related to first module is not held into memory.

当我手动执行此操作时,它会清除内存中的数据,它成功地完成了垃圾收集。但是当我为此运行CodedUI场景时,它会保存与内存中第一个模块相关的自动化对等类。

When I do this manually it clears out the data from memory and it finishes garbage collection successfully. But when I run the CodedUI scenario for this, it holds automation peer classes related to the first module in memory.

有关如何解决此问题的任何建议吗?

Any suggestion on how to get rid of this issue?

谢谢

推荐答案

嗨DMS1030,

Hi DMS1030,

由于您的问题是关于CodedUI,我将您的主题定义为
单元测试
论坛寻求合适的帮助。

Since your question is about CodedUI , I moned your thread to Unit Testing forum for suitable help.

您的理解与合作将不胜感激。

Your understanding and cooperation will be grateful.

此致,

Bob


这篇关于运行CodedUI方案时,自动化对等体仍保留在内存中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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