Page 1 of 1

Unusual behaviour when launch Ranorex tests via Nunit Gui

Posted: Mon Jan 13, 2014 12:03 pm
by benny28
Hello, I've discovered unusual behaviour in my application under test when I launch my tests using either NUnit or TeamCity NUnit build. Basically when I use NUnit some of the application right click menu options are greyed out. As opposed to when I run the tests directly from Visual Studio everything behaves correctly.

Some background:
* I use Ranorex DLL's imported into my Visual Studio project. Version 4.1.4.16685
>> Ranorex.Core
>> Ranorex.Plugin.Web

* Specflow version 1.9.1.84

* Unit.Framework reference version 2.6.3.13283
* NUnit GUI version 2.6.3.13283

* In Ranorex Studion when I record and run the launching steps everything works correctly.

So it seems to be specific to NUnit, my versions numbers match, but this has me baffled and it is a major bug in my framework.

My Code Example:

** Feature File

Code: Select all

Scenario Outline: Launch Application
	Given I launch application <role>

Examples:
	| role  |
	| ATESTER |

** Step Defintion

Code: Select all

[Given(@"I launch application (.*)")]
        public void GivenILaunchApplication(string p0)
        {
            Host.Local.RunApplication(Config.WpfClientLocation, ExtensionMethods.RunAsRole(p0), "", false);
        }

** Extension Methods

Code: Select all

public static string RunAsRole(string user)
        {
            return String.Format("/runas:{0}", user);
        }

Are there any know issues with Ranorex and NUnit that would help me debug this issue?
Or any thoughts in general?

I don't want to remove Nunit from my framework and replace it with MSTest for example as the work load would be huge and MSTest does not have the benefit of a standalone GUI.

Cheers in advance.

Re: Unusual behaviour when launch Ranorex tests via Nunit Gui

Posted: Tue Jan 14, 2014 6:28 pm
by BernhardS
Hello benny28,

There are no known issue in Ranorex in connection with NUnit at the moment.
I am afraid that this is no issue in Ranorex directly and that's the reason that we cannot provide support for that issue.
Have you already read the blog "Integrating Ranorex Automation in TeamCity CI Processes" on our website?

Regards,
Bernhard

Re: Unusual behaviour when launch Ranorex tests via Nunit Gui

Posted: Wed Jan 15, 2014 10:42 am
by benny28
Hey Bernhard thanks for the reply, yes you are correct in that this issue is not directly related to Ranorex.

As I've investigated further I've learned that NUnit treats our application in a Piece Meal manner, meaning that it only seems to load meta data as it needs it. This is why I'm seeing intermittent greyed-out menus when I run via NUnit and it works correctly when I run the application any other way.

Unfortunately for me it means I have to strip out NUnit from the framework and integrate MsTest :cry:

Re: Unusual behaviour when launch Ranorex tests via Nunit Gui

Posted: Thu Jan 16, 2014 4:57 pm
by BernhardS
Hi benny28,

I am sorry to hear that.
Thank you for the information.

Regards,
Bernhard