#649- dotTrace 2.0 prevents TestDriven from running from within Visual Studio 2005

http://www.intellij.net/tracker/netprofiler/viewSCR?publicId=649
Using TestDriven 2.0 beta. If I uninstall dotTrace the problem goes away. Also - dotTrace 1.1 does not give me the problem.

I get the following security exception:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Serialization.SerializationException: Because of security restrictions, the type TestDriven.TestRunner.Framework.TestResultSummary cannot be accessed. ---> System.Security.SecurityException: Request failed.
at System.Runtime.Serialization.FormatterServices.nativeGetSafeUninitializedObject(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.PermissionSet
The demand was for:
The only permitted permissions were: ]]>

The method that caused the failure was:
System.Runtime.Remoting.Channels.ServerProcessing ProcessMessage(System.Runtime.Remoting.Channels.IServerChannelSinkStack, System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Channels.ITransportHeaders, System.IO.Stream, System.Runtime.Remoting.Messaging.IMessage ByRef, System.Runtime.Remoting.Channels.ITransportHeaders ByRef, System.IO.Stream ByRef)
--- End of inner exception stack trace ---

Server stack trace:
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr)
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord pr)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)

Exception rethrown at :
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at TestDriven.TestRunner.Framework.ITestListener.TestFinished(TestResultSummary summary)
at TestDriven.TestRunner.ProxyTestListener.TestDriven.TestRunner.Framework.ITestListener.TestFinished(TestResultSummary summary)
at TestDriven.TestRunner.ProxyTestListener.TestDriven.TestRunner.Framework.ITestListener.TestFinished(TestResultSummary summary)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at :
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at TestDriven.TestRunner.Framework.ITestListener.TestFinished(TestResultSummary summary)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at TestDriven.TestRunner.ThreadTestRunner.Message.Invoke()
at TestDriven.TestRunner.ThreadTestRunner.Runner.Pump()
at TestDriven.TestRunner.ThreadTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)
at TestDriven.TestRunner.ProxyTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)

0
3 comments

I can verify this. I had submitted a bug to the TestDriven.Net team. After reading this I uninstalled 2.0 and TestDriven.Net now works.

0

I found out what the problem was. TestDriven.Net was picking the remoting channel that dotTrace installs. There is a setting that TestDriven.Net uses (typeFilterLevel="Full") that allows it to pass custom types over the remoting channel. dotTrace doesn't require this setting.

I have increased the priority of the TestDriven.Net remoting channel. Now when faced with a choice it should pick up its own channel rather than the first one installed.

TestDriven.Net and dotTrace 2.0 will play nicely together as of 1625. :)

Thanks, Jamie.

--
http://www.testdriven.net
http://weblogs.asp.net/nunitaddin

jamie.cansdale@testdriven.net

0

Jamie, why TestDriven.Net was picking the remoting channel that dotTrace installs? Did they use same TCP/IP ports?

0

Please sign in to leave a comment.