在VS2015中运行CodedUI测试时出现内存不足 [英] Out of Memory Exception while running CodedUI Tests in VS2015

查看:213
本文介绍了在VS2015中运行CodedUI测试时出现内存不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CodedUI Ordered测试时面临Out of Memory异常。我们有大约318个测试用例,每次执行脚本时,执行都会停止。以前所有的脚本运行正常。我们使用CodedUI Framework和Spe​​cflow
进行测试用例脚本编写。使用有序测试将单个测试用例组合在一起,以便在一次运行中获得结果。


请查看下面的堆栈跟踪错误,我们在执行期间获得;


Result33消息:         调用测试类的初始化方法时出错
UltraDataAutomation.TestCases.CommonScenariosFeature: System.OutOfMemoryException:类型为"System"的异常。抛出了OutOfMemoryException。


其中粗体消息特定于我正在使用的Project。执行时现在发生多个内存不足异常。此脚本在不同的测试用例中也失败了。


我正在使用VS企业版进行代码开发(VS2015)


Specflow(版本2.4.1)


如果您对此有任何建议或信息,请与我们联系。


解决方案

Hi

Sreejith Kallivalappil


Welcome到MSDN论坛。


>> 以前所有脚本都运行正常。 


测试是否都适用于脚本?如果在测试出错之前机器有任何变化?


>>我们有大约318个测试用例 


由于你有很多测试要运行一次,如果可能的话,一次运行较少的测试,如100/100/118。更重要的是,如果你的机器是
运行测试的是32位,如果你在其他64位机器上运行它会得到什么结果。


 >> 此脚本在不同的测试用例中也失败。


你的意思是你机器中有任何specflow的测试用例都失败了,或者这个问题中有不同的specflow流程失败了吗?


关于失败的测试,所有318个测试失败或部分失败?如果所有测试都失败了,因为这些是有序测试,请注意
第一个失败的方法检查其测试类中的初始方法是否占用了太多内存。如果只有部分内存失败,请参考包含失败测试的失败类,检查test initialize方法中的代码是否占用内存。


希望以上所有内容都可以帮助解决这个问题。期待收到您的回复。


最好的问候,


萨拉


I Am facing Out Of Memory Exception while CodedUI Ordered tests. We have around 318 test cases, each time when I execute script, Execution is stopped in between. Previously all scripts were running fine. We are using CodedUI Framework along with Specflow for test case scripting. Individual test cases are grouped together using ordered tests for getting results in a single run.

Please find below stack trace errors, we got during execution;

Result33 Message:          Error calling Initialization method for test class UltraDataAutomation.TestCases.CommonScenariosFeature: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

where the bold message is specific to Project which I am working. Multiple Out of memory exceptions is now occurring while execution. Also script is failed at different test cases.

I am Using VS enterprise edition for code development(VS2015)

Specflow (Version 2.4.1)

Please let me know if you have any suggestions or information regarding the same.

解决方案

Hi Sreejith Kallivalappil,

Welcome to the MSDN forum.

>> Previously all scripts were running fine. 

Do the tests all work well with scripts? And if there has any change in machine before the test gets error?

>> We have around 318 test cases  

Since you have so many tests to run one time, if possible, run fewer tests one time such like 100/100/118. What’s more, if your machine that runs the tests is 32-bit, what about the results if you run it in other 64-bit machine.

 >> Also script is failed at different test cases.

Do you mean any test case with specflow in your machine failed or just different cases with specflow in this issue failed?

And about the failed tests, all 318 tests failed or part of them failed? If all tests failed, as those are ordered tests, please watch the first failed method to check if the initial method in its test class has occupied too much memory. If only part of them failed, refer to the failed class which contain failed tests, to check if the code in test initialize method takes memory.

Hope all above can help solve this issue. Looking forward to hearing from you.

Best regards,

Sara


这篇关于在VS2015中运行CodedUI测试时出现内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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