Ich habe ein Test-Framework, wo wir beabsichtigen, Codedui sowie Specflow zu verwenden. Ich habe die Werkzeuge Setup separat vor, aber ich bin zur Zeit einen Fehler bekommen die specflow Test mit den beiden Werkzeugen auf Laufen geladen zusammen:Visual Studio 2017 SpecFlow und CodedUI Assembly konnte nicht geladen werden
[10/12/2017 12:02:00 AM Informational] ------ Discover test started ------
[10/12/2017 12:02:01 AM Informational] NUnit Adapter 3.8.0.0: Test discovery starting
[10/12/2017 12:02:01 AM Informational] NUnit Adapter 3.8.0.0: Test discovery complete
[10/12/2017 12:02:01 AM Informational] NUnit VS Adapter 2.1.1.0 discovering tests is started
[10/12/2017 12:02:01 AM Warning] Dependent Assembly Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a of C:\Users\*****\documents\visual studio 2017\Projects\*****\*****\bin\Debug\*****.dll not found. Can be ignored if not a NUnit project.
[10/12/2017 12:02:01 AM Informational] NUnit VS Adapter 2.1.1.0 discovering test is finished
[10/12/2017 12:02:01 AM Informational] ========== Discover test finished: 2 found (0:00:00.2788078) ==========
[10/12/2017 12:02:01 AM Informational] ------ Run test started ------
[10/12/2017 12:02:01 AM Informational] NUnit Adapter 3.8.0.0: Test execution started
[10/12/2017 12:02:01 AM Informational] Running selected tests in C:\Users\******\documents\visual studio 2017\Projects\******\******\bin\Debug\******.dll
[10/12/2017 12:02:01 AM Informational] NUnit3TestExecutor converted 1 of 1 NUnit test cases
[10/12/2017 12:02:01 AM Warning] TearDown failed for test fixture ******.Specflow.Features.SpecFlowFeature1Feature
[10/12/2017 12:02:01 AM Warning] System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
[10/12/2017 12:02:01 AM Warning] at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
at TechTalk.SpecFlow.Bindings.Discovery.RuntimeBindingRegistryBuilder.BuildBindingsFromType(Type type)
at TechTalk.SpecFlow.Bindings.Discovery.RuntimeBindingRegistryBuilder.BuildBindingsFromAssembly(Assembly assembly)
at TechTalk.SpecFlow.TestRunnerManager.BuildBindingRegistry(IEnumerable`1 bindingAssemblies)
at TechTalk.SpecFlow.TestRunnerManager.InitializeBindingRegistry(ITestRunner testRunner)
at TechTalk.SpecFlow.TestRunnerManager.CreateTestRunner(Int32 threadId)
at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(Int32 threadId)
at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(Assembly testAssembly, Nullable`1 managedThreadId)
at *****.Specflow.Features.SpecFlowFeature1Feature.FeatureSetup()
--TearDown
at *****.Specflow.Features.SpecFlowFeature1Feature.FeatureTearDown()
[10/12/2017 12:02:01 AM Informational] NUnit Adapter 3.8.0.0: Test execution complete
[10/12/2017 12:02:02 AM Informational] ========== Run test finished: 1 run (0:00:00.7393256) ==========
ich die Referenzen überprüft haben, und es scheint, wie die „fehlenden“ Verweis auf Microsoft.VisualStudio.QualityTools.CodedUITestFramework ist in meinen Referenzen aufgeführt. Was könnte sonst noch das Problem sein?
Haben Sie versucht, das Problem um den fehlenden Verweis zu lösen .. wenn nicht würde vorschlagen, dass Sie es zuerst tun .. –