0

When running MbUnit (3.4.14.0) tests via TeamCity (8.0.2 build 27482), I got the error:

[Error] A fatal exception occurred while running tests.  Possible causes include invalid test runner parameters and stack overflows.
Gallio.Model.ModelException: An exception occurred while invoking a test driver. 
---> Gallio.Model.ModelException: Gallio.Model.ModelException: A fatal exception occurred while running test commands. 
---> Gallio.Runtime.RuntimeException: Could not resolve instance of component 'Gallio.PatternTestController'.
---> Gallio.Runtime.RuntimeException: Could not resolve required dependency 'formatter' of type 'Gallio.Runtime.Formatting.IFormatter' due to an exception. ---> Gallio.Runtime.RuntimeException: Could not resolve instance of component 'Gallio.Formatter'. 
---> Gallio.Runtime.RuntimeException: Could not resolve required dependency 'rules' of type 'Gallio.Runtime.Formatting.IFormattingRule[]' due to an exception. ---> Gallio.Runtime.RuntimeException: Could not resolve instance of component 'Gallio35.ExpressionFormattingRule'. 
---> Gallio.Runtime.RuntimeException: Could not resolve the component handler of component 'Gallio35.ExpressionFormattingRule'.
---> Gallio.Runtime.RuntimeException: Could not resolve the component type of component 'Gallio35.ExpressionFormattingRule'. 
---> Gallio.Common.Reflection.ReflectionResolveException: Could not resolve type 'Gallio.Runtime.Formatting.ExpressionFormattingRule, Gallio35'. 
---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)   at System.Type.GetType(String typeName)   at Gallio.Common.Reflection.TypeName.Resolve() in c:\Server\Projects\MbUnit v3\Work\src\Gallio\Gallio\Common\Reflection\TypeName.cs:line 175   
--- End of inner exception stack trace ---   at Gallio.Common.Reflection.TypeName.Resolve() in c:\Server\Projects\MbUnit v3\Work\src\Gallio\Gallio\Common\Reflection\TypeName.cs:line 184   at Gallio.Runtime.Extensibility.ComponentDescriptor.ResolveComponentType() in c:\Server\Projects\MbUnit v3\Work\src\Gallio\Gallio\Runtime\Extensibility\ComponentDescriptor.cs:line 111   
--- End of inner exception stack trace 

In the previous test run some Back-End tests ran OK, but on the last stage, UI tests hung and I cancelled the TeamCity job.

Any ideas what can cause the error?

Thanks.

  • you have an `OutOfMemoryException` in there. can you check your memory usage on your build server? – wal Jul 21 '14 at 10:42
  • Memory usage is acceptable, 40%-50%. Can the problem be with my tests? – Stan Desyatnikov Jul 21 '14 at 11:57
  • are you consistently getting that OutOfMemoryException ? if yes then see what happens to the mem as you run the tests. – wal Jul 21 '14 at 12:18
  • Yes, consistently. I don't have many tests. The failure happens, I think, when the tests start running. I didn't see any memory issues during a test run. – Stan Desyatnikov Jul 21 '14 at 13:20
  • I can only suggest general information at this stage, eg comment out a group of tests until you figure out which one causes the problem. also, see if any of the test processes are hanging around that shouldnt be (mstest works like this, am not referring to teamcity) – wal Jul 21 '14 at 13:31

1 Answers1

0

A colleague of mine advised to restart the TeamCity service on the build server. It helped.