开发者

How to examine reason for a test-suite running much slower in one environment

开发者 https://www.devze.com 2023-01-25 04:27 出处:网络
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

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.

Coul开发者_如何学Pythond 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?


I'd see if and what the difference are between the two environments:

  • Is it the same operating system and filesystem?
  • What is the CPU load of the machine?
  • What is the I/O load of the machine?
  • Does something show up in the syslog, e.g. a (network or authentication) timeout may lead to extremely decreased performance
  • Do the test cases use external resources (e.g. databases, network) which may have different access paths from where the slow machine is located?
  • Does TeamCity produce extensive reports after each test, which may be what is slow? Perhaps it's not the actual testcase execution, but another operation which is performed in between tests or after tests.
  • Does the TeamCity environment perform any setup or teardown functionality which is not executed locally? Such as building up a test database or pruning an existing testing database?
  • Is the slow machine a clustered build server which has to communicate over the wire between master and slaves? Is the testing executed on the master or the slave?

Also, do you run the test cases locally also in TeamCity?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消