1

I'm using a setup of TeamCity 9.1.6, NUnit 3.2.1 and Selenium 2.5.3 drivers on FireFox browser.

I've met this strange behavior when executing a long UI test test. I've noticed that NUnit runner started failing the test after 10-16 minutes with error code -100. I've looked into NUnit error codes, and a -100 seems to be an unexpected error (source: Does anyone know where to find NUnit console exit codes meanings?).

Well, the test is long, but it's probably just 4 minutes long, it can't have possibly been executing for 16 minutes, I thought... Locally everything was fine.

So I've connected to the server through Remote Desktop and followed the execution. And that is when I've noticed that the test actually has passed around the 4 minute mark, and went onto the next one, and then next one and so on... But in the TeamCity build log I was seeing that NUnit was still thinking it's executing that same test.

Did anyone have anything similar? Maybe there's some trick to fix this or some setting that causes this? I can't seem to find any real info on this.

Community
  • 1
  • 1
Jurijs Kastanovs
  • 685
  • 1
  • 15
  • 35
  • Since NUnit will run fixtures in parallel, you probably first need to check whether that's what is happening. Tests can run at the same time in NUnit if you have used the ParallelizableAttribute _or_ if one of them is in the MTA while the other is in the STA. – Charlie Jun 13 '16 at 14:06
  • TeamCity reporting isn't always to be trusted. Do you see the same thing happening if you just run the tests with nunit3-console? – Charlie Jun 13 '16 at 14:07
  • 1
    Error code 100 would mean 100 tests failed. Error code -100 means unexpected error. (Sorry for all the comments, but I wouldn't have an actual answer without more info - only guesses.) – Charlie Jun 13 '16 at 14:10
  • @Charlie tests aren't running in parallel. They run one by one, in the same service session. I can follow the execution through remote desktop, and they're running 1 by 1. Also, you were right about Error Code being -100, will edit. As for nunit3-console, I haven't tried that on TeamCity server, but locally - everything works a-ok! – Jurijs Kastanovs Jun 16 '16 at 06:05
  • I've actually worked around this by now, by lowering wait times. I've made a procedure to look for an element out of a given set of elements, and do it N times while Thread.Sleep-ing for M seconds. To be honest, maybe Thread.Sleep is what somehow caused the problem? I've just had longer sleep times before doing the wait+search in cycle. – Jurijs Kastanovs Jun 16 '16 at 06:08

0 Answers0