Closed MummanaSubramanya closed 6 years ago
@MummanaSubramanya Could you post your complete srProfile here? If not, please send a mail to support@specflow.org with reference to this issue. Thanks!
please find my .srprofile file
@MummanaSubramanya Please try that:
Tests are not displayed in the Test Explorer window when using SpecFlow+ Runner The Visual Studio Test Adapter cache may also get corrupted, causing tests to not be displayed. If this happens, try clearing your cache as follows:
Close all Visual Studio instances Navigate to your %TEMP%\VisualStudioTestExplorerExtensions\ folder and delete any sub-folders related to SpecFlow/SpecRun. Reopen your solution and ensure that it builds.
It's from here: http://specflow.org/documentation/Troubleshooting-Visual-Studio-Integration/
thanks @SabotageAndi it worked like charm :)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I have installed spec runner to run my specflow testcases but when I click on rebuild.
Details: Win10 VS 2017 Professional Specflow 2.3.1 Specrun :1.7.0
It throws error::
[3/9/2018 1:33:09 PM Informational] SpecFlow + Runner Discovery started [3/9/2018 1:33:09 PM Informational] Error for test assembly C:\Users\Subramanya Vasu\source\repos\UnitTestProject1\UnitTestProject1\bin\Debug\UnitTestProject1.dll [3/9/2018 1:33:09 PM Informational] TechTalk.SpecRun.Framework.SpecRunConfigurationException: Invalid configuration: There was an error reflecting type 'TechTalk.SpecRun.Framework.Configuration.TestProfile'. -> There was an error reflecting property 'ExecutionSettings'. -> There was an error reflecting type 'TechTalk.SpecRun.Framework.Configuration.ExecutionSettings'. -> Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. ---> System.InvalidOperationException: There was an error reflecting type 'TechTalk.SpecRun.Framework.Configuration.TestProfile'. ---> System.InvalidOperationException: There was an error reflecting property 'ExecutionSettings'. ---> System.InvalidOperationException: There was an error reflecting type 'TechTalk.SpecRun.Framework.Configuration.ExecutionSettings'. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. 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(RuntimePropertyInfo property, RuntimeType caType) at System.Reflection.RuntimePropertyInfo.GetCustomAttributes(Boolean inherit) at System.Xml.Serialization.XmlAttributes..ctor(ICustomAttributeProvider provider) at System.Xml.Serialization.XmlReflectionImporter.GetAttributes(MemberInfo memberInfo) at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) --- End of inner exception stack trace --- at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) --- End of inner exception stack trace --- at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) --- End of inner exception stack trace --- at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel model, XmlRootAttribute root, String defaultNamespace, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace) at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace) at TechTalk.SpecRun.Framework.Configuration.TestProfileLoader.LoadProfileWithDefaultNamespace(String content, String defaultNamespace) --- End of inner exception stack trace --- at TechTalk.SpecRun.Framework.Configuration.TestProfileLoader.LoadProfileWithDefaultNamespace(String content, String defaultNamespace) at TechTalk.SpecRun.Framework.Configuration.TestProfileLoader.LoadProfileWithDefaultNamespace(TextReader reader, String fileName) at TechTalk.SpecRun.Framework.Configuration.TestProfileLoader.LoadTestProfileFromFile(String filePath) at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable
1 source) at TechTalk.SpecRun.Framework.Configuration.TestProfileLoader.LoadTestProfileFromFirstExistingFile(IEnumerable1 filePaths) at TechTalk.SpecRun.VisualStudio.TestAdapter.Settings.ProfileProvider.GetTestProfile(IDiscoveryContext discoveryContext, String source, TestingContext testingContext) at TechTalk.SpecRun.VisualStudio.TestAdapter.TestingContext.LoadTestProfile(String source) at TechTalk.SpecRun.VisualStudio.TestAdapter.SpecRunTestDiscoverer.DiscoverTests(String source, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink) at TechTalk.SpecRun.VisualStudio.TestAdapter.SpecRunTestDiscoverer.DiscoverTests(IEnumerable
1 sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink) [3/9/2018 1:33:09 PM Error] An exception occurred while test discoverer 'SpecRunTestDiscoverer' was loading tests. Exception: Invalid configuration: There was an error reflecting type 'TechTalk.SpecRun.Framework.Configuration.TestProfile'. -> There was an error reflecting property 'ExecutionSettings'. -> There was an error reflecting type 'TechTalk.SpecRun.Framework.Configuration.ExecutionSettings'. -> Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. [3/9/2018 1:33:12 PM Informational] ========== Discover test finished: 1 found (0:00:16.3355317) ==========My Default.srprofile:
<?xml version="1.0" encoding="utf-8"?>