Run ranorex .exe from MS Release Management

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
mfuxi
Posts: 4
Joined: Tue May 05, 2015 1:51 pm

Run ranorex .exe from MS Release Management

Post by mfuxi » Tue May 05, 2015 2:00 pm

Hi,

I'm using MS Release Management in order to deploy my applications to remote servers. (windows server 2008 r2)
When I run the Test Suite .exe i'm getting the following errors:

[2015/05/05 15:31:39.146][Info ][Test]: Test Module 'AddNotification' started.
[2015/05/05 15:31:39.177][Info ][Mouse]: Mouse Left Click item 'Http19216821773NotificationStatio.Http19216821773NotificationStatio.Notifications1' at Center.
[2015/05/05 15:33:09.525][Error ][Module]: Failed to find item 'CoreNotificationRepository.Http19216821773NotificationStatio.Http19216821773NotificationStatio.Notifications1'.<br/>No element found for path '/form[@title~'^192\.168\.217\.73/Not']/element[5]/container[@caption~'^192\.168\.217\.73/Not']//form[@title='' and @win32ownerwindowlevel='0']/?/?/element/container/container[1]/container/container[1]/menubar/menuitem[@automationid='menuNotification']' within 1.5m.
[2015/05/05 15:33:09.639][Failure][Test]: Test Module 'AddNotification' completed with status 'Failed'.
[2015/05/05 15:33:09.652][Failure][Test]: Test Case 'AddNotification_Email' completed with status 'Failed'.
[2015/05/05 15:33:09.654][Failure][Test]: Test Suite 'CoreNotification' completed with status 'Failed'.
[2015/05/05 15:33:09.721][Debug ][Logger]: Console logger stopping.
Done with errors.

C:\CoreNotification_Backup\CoreNotification\bin\Debug\CoreNotification.exe exited with code: -1

Exiting with error: -1

Any idea?
P.S: I thought that it could be related to the fact i'm running a script from the build server on a remote automation server but also when I run it locally as u can see in the script it fails with the same error message.

Thanks,
Moty.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Run ranorex .exe from MS Release Management

Post by odklizec » Tue May 05, 2015 7:52 pm

Hi,

The most probable reason of the failure is the IP address hardcoded in the xpath of the failing element...

Code: Select all

[2015/05/05 15:33:09.525][Error ][Module]: Failed to find item 'CoreNotificationRepository.Http19216821773NotificationStatio.Http19216821773NotificationStatio.Notifications1'.<br/>No element found for path '/form[@title~'^192\.168\.217\.73/Not']/element[5]/container[@caption~'^192\.168\.217\.73/Not']//form[@title='' and @win32ownerwindowlevel='0']/?/?/element/container/container[1]/container/container[1]/menubar/menuitem[@automationid='menuNotification']' within 1.5m.
Are you sure the IP displayed in the title/caption is always the same? I don't know anything about your app under test, but identifying element based of the title/caption containing an IP address, which is prone to changes, is a very bad idea.

I would also suggest you to use meaningful repository item names. I guess the name "CoreNotificationRepository.Http19216821773NotificationStatio.Http19216821773NotificationStatio.Notifications1" has been generated by Ranorex during recording, but it's up to you to make the repository readable. Believe me, using meaningful repository names would make your automation life a lot of easier ;)

Watch the screencast "Organizing and Optimizing a Ranorex Repository" (and others) available here...
http://www.ranorex.com/support/screencasts.html
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

mfuxi
Posts: 4
Joined: Tue May 05, 2015 1:51 pm

Re: Run ranorex .exe from MS Release Management

Post by mfuxi » Wed May 06, 2015 8:04 am

The IP is always the same.
Those names aren't so meaningful since this is just a POC.

When I run the Ranorex test suite .exe not from Microsoft Release Management it works great but from the Release management it doesn't.

The problem I assume is that I see an iexplore process when the Release management tries to run the test suite but it has a problem doing the UI test itself.

Couldn't it be related to some parameter I should add in the Ranorex command line? after all i'm running the test suite in command line.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Run ranorex .exe from MS Release Management

Post by odklizec » Wed May 06, 2015 8:31 am

Hi,

I don't think it's a question of parameter you should use. I don't know anything about Microsoft Release Management so I can't help with this. But the error you are getting simply means that Ranorex cannot find the element on the path used in your test. So the element is either not available or the path(GUI) on target system is different.

Are you sure the element in question (CoreNotificationRepository.Http19216821773NotificationStatio.Http19216821773NotificationStatio.Notifications1) is available if the test is started via MRM?
If you run the exe outside the "Microsoft Release Management", are you running it on the same machine as with MRM?
There seems to be no step that prepares the application under test before starting the main test? Do you start the web page manually before running the test? If so, make sure there is just one instance of the page open!
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

mfuxi
Posts: 4
Joined: Tue May 05, 2015 1:51 pm

Re: Run ranorex .exe from MS Release Management

Post by mfuxi » Wed May 06, 2015 3:17 pm

Hi,

The problem isn't in the element, the problem is that the browser isn't working in the right manner.
I see the process in the task manager but when i'm in the server it doesn't pop the browser although i'm in the server with the right user which is running the test.

Regarding your question, yes, when I ran it manually it was on the same machine as with the MRM.

I don't start the web page manually there's supposed to be no need for that.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Run ranorex .exe from MS Release Management

Post by odklizec » Thu May 07, 2015 7:15 am

Hi,
The problem isn't in the element, the problem is that the browser isn't working in the right manner.
I see the process in the task manager but when i'm in the server it doesn't pop the browser although i'm in the server with the right user which is running the test.
So you see the browser process in the task manager, but there is no browser window displayed? This of course could be the reason of your issue. Ranorex needs realized GUI to be able to access it. So who starts the browser? Some script/batch in MRM or it's started via your Ranorex project?
I don't start the web page manually there's supposed to be no need for that.
According to the failing script, Ranorex is trying to access an element in web page, right? So who (when) starts the browser and loads the web page before Ranorex is trying to access it? Is it started somewhere in your Ranorex project (before this failing line)? If so, how exactly is the browser started?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

mfuxi
Posts: 4
Joined: Tue May 05, 2015 1:51 pm

Re: Run ranorex .exe from MS Release Management

Post by mfuxi » Thu May 07, 2015 4:05 pm

Hi,

MRM is based on Powershell all of it's actions are Powershell commands and script which are working behind the stage.

So in our case it runs a powershell script which starts a CMD and in this CMD the test suite runs look:

Code: Select all

Microsoft Release Management RunCommandLine PowerShell Script v12.0
Copyright (c) 2013 Microsoft. All rights reserved.

Executing with the following parameters:
  FilePath: \\akivs-t440s\Users\akivs\Documents\Ranorex\RanorexStudio Projects\
CoreNotification_Backup\CoreNotification\bin\Debug\CoreNotification.exe
  Arguments: (omitted)
  User Name: 
  User Password: (omitted)
  User Domain: 
  Working Directory: (script path)

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Run ranorex .exe from MS Release Management

Post by odklizec » Thu May 07, 2015 4:32 pm

Hi,

Thanks for the explanation. However, there is still missing, what I believe, a crucial info about how is started the application under test? Is it started from Ranorex project or is there a separate MRM command starting it before firing the Ranorex test?

In your previous posts, you mentioned this...

Code: Select all

I see the process in the task manager but when i'm in the server it doesn't pop the browser although i'm in the server with the right user which is running the test.
This is probably the key to the issue. If there is no GUI, Ranorex cannot find the elements.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration