如何检查测试套件在一种环境中运行速度慢得多的原因
我们已经配置了 teamCity,在其上运行我们的构建进行测试。问题是,当我们在 TeamCity 上运行时,有几个测试用例(谈论一个具有 5-15 个测试方法的特定类)几乎需要 45 分钟。
我一直在尝试在本地计算机上测试相同的案例,并且它们不会花费超过 6-7 分钟。
你们能否建议我最佳实践,以帮助我找出这些测试用例的可能原因?现在我将日志语句放在每个带有时间戳的地方。我还有什么可以做的吗?
We have configured teamCity on which we run our builds for testing. The problem is, there are couple of testcases (talking about one particular class having 5-15 test methods) which take almost 45 min when we run on TeamCity.
I have been trying to test the same cases on local machine and they don't take more than 6-7 min.
Could you guys suggest me the best practices which can help me figuring out what could be possible reason of these test cases? Right now I am putting log statements every where with timestamps. Is there anything else that I can do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想看看这两个环境之间是否有区别以及有什么区别:
另外,您是否也在 TeamCity 中本地运行测试用例?
I'd see if and what the difference are between the two environments:
Also, do you run the test cases locally also in TeamCity?
我之前使用过 YJP(yourkit java profiler)来分析应用程序。我认为在他们让你购买许可证之前的前 15 天左右是免费的。
I've used YJP (yourkit java profiler) to profile applications before. I think it is free for the first 15 days or so before they make you buy a license.