Page 1 of 1

Error while running the solution through NUnit Console

Posted: Tue Mar 03, 2020 1:57 pm
by ramanaramidi
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.

Re: Error while running the solution through NUnit Console

Posted: Tue Mar 03, 2020 2:10 pm
by Stub
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?

Re: Error while running the solution through NUnit Console

Posted: Tue Mar 03, 2020 3:44 pm
by ramanaramidi
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

Re: Error while running the solution through NUnit Console

Posted: Wed Mar 04, 2020 4:42 pm
by mayo
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,

Re: Error while running the solution through NUnit Console

Posted: Thu Mar 05, 2020 7:31 am
by ramanaramidi
Hi,

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

Regards,
Ramana.

Re: Error while running the solution through NUnit Console

Posted: Mon Mar 16, 2020 3:16 pm
by ramanaramidi
Hi,

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

Regards,
Ramana.

Re: Error while running the solution through NUnit Console

Posted: Mon Mar 16, 2020 3:22 pm
by odklizec
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.

Re: Error while running the solution through NUnit Console

Posted: Tue Mar 17, 2020 2:29 pm
by ramanaramidi
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.

Re: Error while running the solution through NUnit Console

Posted: Tue Mar 17, 2020 4:57 pm
by Stub
It thinks you need to reinstall Ranorex now.

Re: Error while running the solution through NUnit Console

Posted: Tue Mar 17, 2020 7:17 pm
by ramanaramidi
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.

Re: Error while running the solution through NUnit Console

Posted: Tue Mar 17, 2020 9:32 pm
by odklizec
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?

Re: Error while running the solution through NUnit Console

Posted: Wed Mar 18, 2020 7:08 am
by ramanaramidi
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.

Re: Error while running the solution through NUnit Console

Posted: Wed Mar 18, 2020 7:48 am
by odklizec
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.

Re: Error while running the solution through NUnit Console

Posted: Wed Mar 18, 2020 3:44 pm
by ramanaramidi
Hi,

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

Regards,
Ramana.