Error while running the solution through NUnit Console

Ask general questions here.
ramanaramidi
Posts: 28
Joined: Wed Feb 26, 2020 6:51 am

Error while running the solution through NUnit Console

Post by ramanaramidi » Tue Mar 03, 2020 1:57 pm

Hi,

I am facing the below issue while trying to run my solution (Renorex integrated with SpecFlow) through NUnit Runner console. The below is the screenshot.

Please letme know if any configuration changes need to be done.

Thanks in advance.


Regards,
Ramana.
Attachments
NUnit_Console_Error.JPG
NUnit_Console_Error.JPG (228.37 KiB) Viewed 304 times

User avatar
Stub
Posts: 341
Joined: Fri Jul 15, 2016 1:35 pm

Re: Error while running the solution through NUnit Console

Post by Stub » Tue Mar 03, 2020 2:10 pm

Your screenshot suggests you are using Ranorex v9.2.1.
Your screenshot also mentions it's using .NET v4.0.

Ranorex v9.2.1 requires .NET v4.6.2, though I would have imagined the Ranorex installer would have installed that for you. Perhaps there is something missing involving .NET v4.6.2?

ramanaramidi
Posts: 28
Joined: Wed Feb 26, 2020 6:51 am

Re: Error while running the solution through NUnit Console

Post by ramanaramidi » Tue Mar 03, 2020 3:44 pm

Thanks for the response.

I am using .Net v4.6.2 and configured the same in project settings. Please find the below screenshots for your information.

But in NUnit console, .NET Framework CLR v4.0.30319.42000 is displayed. In Run Settings the below versions are displayed

ImageRuntimeVersion: 4.0.30319
ImageTargetFrameworkName: .NETFramework,Version=v4.6.2
Attachments
Run_Settings.JPG
Run_Settings.JPG (56.64 KiB) Viewed 298 times
DotNet_Version.JPG
DotNet_Version.JPG (61.98 KiB) Viewed 298 times

User avatar
mayo
Posts: 22
Joined: Fri Dec 28, 2018 7:42 pm

Re: Error while running the solution through NUnit Console

Post by mayo » Wed Mar 04, 2020 4:42 pm

Hello,

Based on the exception thrown I would recommend re-installing Ranorex and be sure to restart the machine between the uninstall and reinstall. Let us know if the issue persists.

Cheers,

ramanaramidi
Posts: 28
Joined: Wed Feb 26, 2020 6:51 am

Re: Error while running the solution through NUnit Console

Post by ramanaramidi » Thu Mar 05, 2020 7:31 am

Hi,

I tried restarting the machine between Uninstall and Install. But the issue still persists.

Regards,
Ramana.

ramanaramidi
Posts: 28
Joined: Wed Feb 26, 2020 6:51 am

Re: Error while running the solution through NUnit Console

Post by ramanaramidi » Mon Mar 16, 2020 3:16 pm

Hi,

I am facing the below issue while running BDD project through nunit console runner.
Please help in fixing this issue.

Regards,
Ramana.
Attachments
Capture.JPG
Capture.JPG (92.32 KiB) Viewed 223 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6036
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Error while running the solution through NUnit Console

Post by odklizec » Mon Mar 16, 2020 3:22 pm

Hi,

It seems you are no longer getting the error about failing Ranorex plugin? This new error "Has no TestFixtures" appears to be a NUnit problem. Please google this error. It has most probably nothing to do with Ranorex.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ramanaramidi
Posts: 28
Joined: Wed Feb 26, 2020 6:51 am

Re: Error while running the solution through NUnit Console

Post by ramanaramidi » Tue Mar 17, 2020 2:29 pm

Hi,

Thanks for the response. I am able to fix the above issue. But I am getting the below error.

Code: Select all

System.TypeInitializationException : The type initializer for 'Ranorex.Core.Element' threw an exception.
  ----> Ranorex.Core.RanorexCoreException : Failed to load default plugins. Please reinstall Ranorex.
  ----> System.IO.FileNotFoundException : Could not load file or assembly 'Ranorex.Plugin.Wpf.Core, Version=9.2.1.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a' 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.
Could you please check?


Thanks,
Ramana.
Attachments
Ranorex_Error_Nunit_Console.JPG
Ranorex_Error_Nunit_Console.JPG (181.77 KiB) Viewed 213 times

User avatar
Stub
Posts: 341
Joined: Fri Jul 15, 2016 1:35 pm

Re: Error while running the solution through NUnit Console

Post by Stub » Tue Mar 17, 2020 4:57 pm

It thinks you need to reinstall Ranorex now.

ramanaramidi
Posts: 28
Joined: Wed Feb 26, 2020 6:51 am

Re: Error while running the solution through NUnit Console

Post by ramanaramidi » Tue Mar 17, 2020 7:17 pm

I tried re-installing Ranorex but facing the same issue.

I am able to run the the solutions successfully from Ranorex studio but not from Nunit console. While running through Nunit console, few Ranorex plugins are not getting loaded which is causing the issue.

Code: Select all

System.TypeInitializationException : The type initializer for 'Ranorex.Core.Element' threw an exception.
  ----> Ranorex.Core.RanorexCoreException : Failed to load default plugins. Please reinstall Ranorex.
  ----> System.IO.FileNotFoundException : Could not load file or assembly 'Ranorex.Plugin.Web, Version=9.2.1.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a' 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.
   at Ranorex.Core.Element.op_Implicit(String path)
   at MyTest.EventDefinition1.BeforeTestRun() in c:\Users\rramidi\Documents\Ranorex\RanorexStudio Projects\MyTest\MyTest\EventDefinition1.cs:line 147
   at lambda_method(Closure , IContextManager )
   at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.InvokeHook(IBindingInvoker invoker, IHookBinding hookBinding, HookType hookType)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(HookType hookType)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnTestRunStart()
   at TechTalk.SpecFlow.TestRunner.OnTestRunStart()
   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 MyTest.CalculationFeature.FeatureSetup() in c:\Users\rramidi\Documents\Ranorex\RanorexStudio Projects\MyTest\MyTest\Feature1.feature.cs:line 0
--RanorexCoreException
   at Ranorex.Core.PluginManager.LoadDefaultPlugins(Boolean nonBlocking)
   at Ranorex.Core.PluginManager.LoadDefaultPluginsSuppressible(Boolean nonBlocking)
   at Ranorex.Core.Element..cctor()
--FileNotFoundException
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Ranorex.Core.PluginManager.LoadDefaultPlugins(Boolean nonBlocking)
--TearDown
Regards,
Ramana.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6036
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Error while running the solution through NUnit Console

Post by odklizec » Tue Mar 17, 2020 9:32 pm

Hi,

I’m afraid, this is something that must be discussed directly with Ranorex support. My guess is, that there is not installed an expected runtime library or there is installed older than expected version of something? Eventually, the NUnit integration is not performed correctly? Please create a support ticket and ask support for help. I guess there will be required a remote session so they can analyse the problem in more details.

BTW, could you please try to install Ranorex and NUnit on another computer?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ramanaramidi
Posts: 28
Joined: Wed Feb 26, 2020 6:51 am

Re: Error while running the solution through NUnit Console

Post by ramanaramidi » Wed Mar 18, 2020 7:08 am

Thank you so much for your time.

As I am using trial license, earlier I tried raising support ticket through [email protected] but there is no response from the team. Please letme know if there is any way to approach them?

Thanks,
Ramana.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6036
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Error while running the solution through NUnit Console

Post by odklizec » Wed Mar 18, 2020 7:48 am

Hi,

Support tickets can be created here:
https://www.ranorex.com/support-query/
There is also mentioned a support email for users with trial version.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ramanaramidi
Posts: 28
Joined: Wed Feb 26, 2020 6:51 am

Re: Error while running the solution through NUnit Console

Post by ramanaramidi » Wed Mar 18, 2020 3:44 pm

Hi,

As I am using trail license, I used the email id given in the link ([email protected]).

Regards,
Ramana.