Page 1 of 1

Exception after TestSuiteRunner.Run call

Posted: Fri Sep 25, 2020 10:44 am
by Elrond
Hello,

I m' using Ranorex 9.3.3
In one of our CSharp project we start the ranorex test using this méthode TestSuiteRunner.Run

After calling this method I always have this exception

System.InvalidOperationException: Unable to resolve type: Ranorex.Core.Utils.ILifecycleService, service name:
Stack Trace:
at Ranorex.Libs.LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)
at Ranorex.Libs.LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError)
at Ranorex.Libs.LightInject.ServiceContainer.GetInstance(Type serviceType)
at Ranorex.Libs.LightInject.ServiceFactoryExtensions.GetInstance[TService](IServiceFactory factory)
at Ranorex.Core.Testing.TestSuiteRunner.RunInternal(Type containerType, String[] testSuiteXmls, RunParams[] rps)
at Ranorex.Core.Testing.TestSuiteRunner.RunInternal(Type containerType, String[] testSuiteXmls, RunParams rp)
at Ranorex.Core.Testing.TestSuiteRunner.RunInternal(Type containerType, String testSuiteXml, RunParams rp)
at Ranorex.Core.Testing.TestSuiteRunner.Run(Type containerType, String cmdLineArgs, String testSuiteXml)
at Ranorex.Core.Testing.TestSuiteRunner.Run(Type containerType, String cmdLineArgs)


When i'm returning in the code, intellicense do not retrieve ILifecycleService under Ranorex.Core.Utils see Intellicense.jpg in attachment.

I d'ont understand why this term is not retrieved
  • i have missing a library ?
  • This term is obsolete in 9.3.3 ?
Thanks as advance.

Re: Exception after TestSuiteRunner.Run call

Posted: Tue Sep 29, 2020 2:02 pm
by Elrond
Hello,

Some more information.

I'm using Visual Studio 2019

Ranorex Tests are executed in a CodeUITest test project.
On the server vstest.console.exe is employed to execute the test.

I have open the Ranorex.Core librairie with Visual Sutdio Object Browser and it's unable to find the interface Ranorex.Core.Utils.ILifecycleService

See the screen shot in attachment

Re: Exception after TestSuiteRunner.Run call

Posted: Thu Oct 15, 2020 3:12 pm
by Elrond
Ok, I close this topic.

In a CodeUITest project, the Ranorex test was called with TestSuiteRunner.Run

In the Ranorex generated Executable the test case is called by TestSuiteRunner.Run too.

I have delete the first call to TestSuiteRunner.Run and instead i start the Ranorex Executable by Proces.Start

In Ranorex 8.3 the old method was run but not in 9.3

I close this topic.