Exception after TestSuiteRunner.Run call

Class library usage, coding and language questions.
Elrond
Posts: 3
Joined: Fri Sep 25, 2020 10:11 am

Exception after TestSuiteRunner.Run call

Post by Elrond » Fri Sep 25, 2020 10:44 am

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.
Attachments
Intellicense.jpg
Intellicense.jpg (23.32 KiB) Viewed 70 times

Elrond
Posts: 3
Joined: Fri Sep 25, 2020 10:11 am

Re: Exception after TestSuiteRunner.Run call

Post by Elrond » Tue Sep 29, 2020 2:02 pm

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
Attachments
Ranorex.Core.Utils.jpg
Ranorex.Core.Utils.jpg (31.3 KiB) Viewed 54 times

Elrond
Posts: 3
Joined: Fri Sep 25, 2020 10:11 am

Re: Exception after TestSuiteRunner.Run call

Post by Elrond » Thu Oct 15, 2020 3:12 pm

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.