负载测试的最后一次单元测试运行以ThreadAbortException结束 [英] Last unit test run of a load test ends with ThreadAbortException

查看:99
本文介绍了负载测试的最后一次单元测试运行以ThreadAbortException结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试运行VS负载测试包含许多单元测试,每次运行测试时,我都会获得最后一次单元测试调用的ThreadAbortionException。对于测试环境,我有1个控制器机器和8个代理,无论我输入
in的测试迭代次数,它总是从每个代理抛出8个或更少的ThreadAbortionException。 

I tried running a VS load test consists of many unit tests, and every time I run the test, I get ThreadAbortionException for the last unit test call. For the test environment, I have 1 controller machine and 8 agents whatever test iterations number I enter in, it always throws 8 or less ThreadAbortionException from each agent. 

To为您提供更多详细信息,我在这些代理商的事件查看器中看到3个错误。

To give you more details, I see 3 errors on event viewer from those agents.

(QTAgent_40.exe,PID 4684,线程13)StateMachine(TestState):处理状态时出现异常Running:System.Threading.ThreadAbortException:线程正在中止。

    at Microsoft.VisualStudio.TestTools.Common.StateMachine`1.Execute()

(QTAgent_40.exe, PID 4684, Thread 13) StateMachine(TestState): Exception while handling state Running: System.Threading.ThreadAbortException: Thread was being aborted.
   at Microsoft.VisualStudio.TestTools.Common.StateMachine`1.Execute()

(QTAgent_40.exe,PID 4684,Thread 13)WebLoadTestAdapter:无法运行测试'UnitTest_LongRequest':线程正在中止。

(QTAgent_40.exe, PID 4684, Thread 13) WebLoadTestAdapter: Could not run test 'UnitTest_LongRequest': Thread was being aborted.

根据您的信息,每个单元测试都在调用WCF服务端点,通常需要30个以上完成每次通话的秒数(因为它在后端处理大日期)

For your information, every unit test is calling WCF service endpoint and it usually takes more than 30 seconds to complete each call (since it's handling large date in a back-end)

当我在这个论坛中寻找解决方案时,我也找到了这张票。 

While I was looking for solution in this forum I also found this ticket. 

https://social.msdn.microsoft.com/Forums/en-US/60e0cf1e-0bbc-48f5-a88f-11efb7988b12/thread-was-being-aborted-exception-at-end-of- load-test?forum = vststest

https://social.msdn.microsoft.com/Forums/en-US/60e0cf1e-0bbc-48f5-a88f-11efb7988b12/thread-was-being-aborted-exception-at-end-of-load-test?forum=vststest

我想知道这是否是异常的原因,我想知道它是否仍然保持相同的考虑这个问题是在十多年前提出的..

I wonder if this is the cause of the exception, and I wonder if it still holds the same considering that question was asked more than a decade ago..

谢谢!

推荐答案

Hi Human1217,

Hi Human1217,

确保整个过程中是否与中止的测试结果有关负载测试完成后,一种简单的方法是选择"测试迭代",而不是选择"加载测试持续时间",查看结果。我的理解是,如果负载测试在达到"持续时间"期间完成,则为
,所有未完成的测试将显示为中止测试。

To make sure that whether it is related to the aborted test result during the whole load test was finished, a simple way is that select the "Test iterations", not select the "Load test duration", view the result. My understanding is that if the load test was finished during it reached to the "duration time", all tests which are not finished will be showed as aborted test.

最好的问候,

杰克


这篇关于负载测试的最后一次单元测试运行以ThreadAbortException结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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