Ranorex log from VS from Jenkins

Class library usage, coding and language questions.
sop
Posts: 11
Joined: Mon Mar 18, 2013 7:29 am

Ranorex log from VS from Jenkins

Post by sop » Fri May 03, 2013 9:12 am

Hi
we are using Jenkins as a system for CI executing mstests inside which I am trying to use ranorex logging (not exactly the way recommended in best practices)
so the code might look like that

Code: Select all

 [TestClass]
    public class Test1
    {
    [TestInitialize]
        public void MyTestInit()
        {
            TestReport.Setup(ReportLevel.Debug, @"logsreport.rxlog", true);
            TestReport.BeginTestSuite("Testsuite");
        }
       
        [TestMethod]
        public void TestMethod1()
        {
            TestReport.BeginTestCase("BeginTestCase");
            TestReport.BeginTestModule("Module1");
            Report.Debug("start application");
            ....
        }

    }

when the job is executed in jenkins it fails on ranorex logging providing the following message
MESSAGE:
Initialization method Ranorex_ExtractionCalculation.ExtractionCalculationTest.MyTestInit threw exception. Ranorex.Core.RanorexCoreException: Ranorex.Core.RanorexCoreException: Failed to load default plugins. Please reinstall Ranorex. ---> Ranorex.Core.RanorexCoreException: Failed to load plugins from assembly 'Ranorex.Plugin.Win32, Version=4.0.2.21666, Culture=neutral, PublicKeyToken=b798506b574ebc9a'. ---> Ranorex.Core.RanorexCoreException: Failed to initialize plugin 'win32'. ---> System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application..
please find the full stack trace in the attachment
stacktrace.txt
all the same works fine if executed form Visual studio for example so it must have to do with jenkins

do you have any ideas?

thanks,
sop
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex log from VS from Jenkins

Post by Support Team » Mon May 06, 2013 1:02 pm

Hello,

This error occurs if Ranorex is not installed.
Please make sure that Ranroex is installed on the machine where you run the test using Jenkins.

Regards,
Bernhard

sop
Posts: 11
Joined: Mon Mar 18, 2013 7:29 am

Re: Ranorex log from VS from Jenkins

Post by sop » Mon May 06, 2013 2:02 pm

sorry Ranorex is surely installed
as I said it works perfectly from Visual Studio - exactly the same code
moreover it works from Jenkins now and then when Window is restarted
it looks like some rights problem or the way how Jenkins executes the code from service or something

but it is ranorex logging specific as when I comment these lines the whole thing doesnt produce any error
so I am not sure if I need to use other logging mechanism instead which would be pity as I like the way ranorex report look like

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex log from VS from Jenkins

Post by Support Team » Fri May 10, 2013 4:37 pm

Hello,

In general, Jenkins should not be started as service.
Please read the blog "Integrating Ranorex Automation in Jenkins CI Process" on our website in order to get additional information how to use Ranorex in connection with Jenkins.

Regards,
Bernhard

sop
Posts: 11
Joined: Mon Mar 18, 2013 7:29 am

Re: Ranorex log from VS from Jenkins

Post by sop » Mon May 13, 2013 7:49 pm

thank you