chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
During test running, after completing 38 tests and run them, I encounter the following exception. After this TestDriven.Net stuck and I cannot rerun the tests without restarting visual studio. I deleted all tests except one, but still, nothing runs and I still see information on the tests I already deleted. Please help.

Test output:

IntelliRunner has encountered an unexpected error.
Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not instantiate Typemock.AutoRun.Adorners.MethodsTracker ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at Typemock.Common.Adorners.MethodsTrackerBase.CreateTrackingSpansFromMethods()
at Typemock.Common.Adorners.MethodsTrackerBase..ctor(IWpfTextView textView, IFileMethodsExplorer fileMethodsExplorer)
at Typemock.AutoRun.Adorners.MethodsTracker..ctor(IWpfTextView textView, IFileMethodsExplorer fileMethodsExplorer)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type implType, Object[] arguments, Type[] signature)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, Object[] arguments, Type[] signature)
--- End of inner exception stack trace ---
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, Object[] arguments, Type[] signature)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments)
at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)
at Castle.Facilities.TypedFactory.TypedFactoryComponent.Resolve(IKernel kernel)
at Castle.Facilities.TypedFactory.Internal.TypedFactoryInterceptor.Resolve(IInvocation invocation)
at Castle.Facilities.TypedFactory.Internal.TypedFactoryInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.IMethodsTrackerFactoryProxy.Create(IWpfTextView textView, IFileMethodsExplorer fileMethodsExplorer)
at Typemock.AutoRun.Adorners.MethodsTrackerCache.GetNewTracker(IWpfTextView wpfTextView)
at Typemock.Common.Adorners.MethodsTrackerCacheBase.GetMethodsTracker(IWpfTextView wpfTextView)
at Typemock.Common.Adorners.MethodDisplay.FileMethodsViewModelsTrackerBase..ctor(IWpfTextView textView, IMethodViewModelsFactory methodViewModelsFactory, MethodsTrackerCacheBase methodsTrackerCacheBase, IMethodContextViewModelRepository methodContextViewModelRepository)
at Typemock.AutoRun.Adorners.FileMethodsViewModelsTracker..ctor(IWpfTextView textView, IMethodViewModelsFactory methodViewModelsFactory, MethodsTrackerCache trackerCache, TestsRepository testsRepository, IMethodContextViewModelRepository methodContextViewModelRepository, File file)
at Typemock.AutoRun.Adorners.MethodContextAdornmentFactory.TextViewCreated(IWpfTextView textView)
Test run results -
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_DalIsCreated
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_GetConnectionNameIsUsed
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_DalInitializedWithConnectionName
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_SQLCommandInitializedWithSPName
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_SQLCommandInitializedWithMemberIdParam
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_DalRunsSQLCommand
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_ReaderIsRead
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataReadReturnFalse_NullReturned
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_ReaderIsDisposedAfterRead
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedData_MemberUnifiedDataConstructedWithReader
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnified_NextResultIsCalled8Times
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithFavorites_1FavoritesIsSet
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithFavorites_FavoritesIsSetRight
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithStudioVideos_VideosAreSetRight
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithSubscribedTo_MembersSubscriptionsAreSet
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithSubscribers_MembersSubscribersAreSet
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithComments_MembersCommentsAreSet
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithCategoriess_CategoriesAreSet
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithUserVideos_UserVideosAreSetRight
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithRejectedVideos_RejectedVideosAreSetRight
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedDataSingleVideo_DalIsCreated
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedData_GetConnectionNameIsUsed
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedData_DalInitializedWithConnectionName
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedData_SQLCommandInitializedWithSPName
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedData_SQLCommandInitializedWithMemberIdParam
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedDataFor2Members_SQLCommandInitializedWith2MemberIdParams
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedData_DalRunsSQLCommand
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedData_ReaderIsRead
pas
asked by ashernave (1.2k points)

3 Answers

0 votes
Hi,

It's seems like a new bug. I've created a patch that provides more information about the error. Can you please install it from here and post the new content of the output window?
answered by Elisha (12k points)
0 votes
Here you are: (BTW, there no such duplicate method)

Failed to distiguish between methods in file 'C:minSourcesworkTypemockTestsMemberTestMemberDataSourceTest.cs', duplicate methods:
MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithStudioVideos_VideosAreSetRight()
Failed to distiguish between methods in file 'C:minSourcesworkTypemockTestsMemberTestMemberDataSourceTest.cs', duplicate methods:
MemberTest.MemberDataSourceTest.DBDataSource_GetMemberUnifiedDataWithStudioVideos_VideosAreSetRight()
START: UpdateAssembliesWhiteList
END : 00:00:00.0111740
START: GetAllTests
END : 00:00:00.0000044
START: Executing tests
END : 00:00:06.3059036
START: Loading test results
END : 00:00:00.0686996
Test run results -
failed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedDataWith2MembersWith2StudioVideos_VideosAreSetRight
Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException : Assert.AreEqual failed. Expected:<1>. Actual:<0>.
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFail(String assertionName, String message, Object[] parameters)
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual[T](T expected, T actual, String message, Object[] parameters)
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual[T](T expected, T actual)
at MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedDataWith2MembersWith2StudioVideos_VideosAreSetRight() in C:minSourcesworkTypemockTestsMemberTestMemberDataSourceTest.cs:line 1006

START: UpdateAssembliesWhiteList
END : 00:00:00.0110864
START: GetAllTests
END : 00:00:00.0000057
START: UpdateAssembliesWhiteList
END : 00:00:00.0180368
START: GetAllTests
END : 00:00:00.0000051
START: UpdateAssembliesWhiteList
END : 00:00:00.0094914
START: GetAllTests
END : 00:00:00.0000044
START: Executing tests
END : 00:00:05.5030645
START: Loading test results
END : 00:00:00.1229162
Test run results -
failed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedDataWith2MembersWith2StudioVideos_VideosAreSetRight
System.Collections.Generic.KeyNotFoundException : The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at FiveMin.Classes.DataAccess.Members.MembersDBDataSource.GetMembersUnifiedData(IList`1 memberIds, IList`1& membersData) in C:minSourcesworkDALMembersMembersDBDataSource.cs:line 653
at MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedDataWith2MembersWith2StudioVideos_VideosAreSetRight() in C:minSourcesworkTypemockTestsMemberTestMemberDataSourceTest.cs:line 1003

START: UpdateAssembliesWhiteList
END : 00:00:00.0095741
START: GetAllTests
END : 00:00:00.0000048
START: Executing tests
END : 00:00:06.1424813
START: Loading test results
END : 00:00:00.0578435
Test run results -
passed: MemberTest.MemberDataSourceTest.DBDataSource_GetMembersUnifiedDataWith2MembersWith2StudioVideos_VideosAreSetRight
answered by ashernave (1.2k points)
0 votes
Thanks, I'm analyzing that.

Besides the error in the output window, do you experience any additional incorrect behavior with the runner's feedback or execution?
answered by Elisha (12k points)
...