Page 1 of 2

Ranorex integration with Robot Framework?

Posted: Sat Feb 05, 2011 9:17 pm
by daluu
Anyone thought of that or would like to have something like that?

Ranorex is nice alternative to other GUI test tools, and Robot Framework is nice test framework that supports multiple tools but could definitely use more tooling support.

Ranorex supports IronPython, and Robot Framework just recently got some/partial support for IronPython. I'm sure eventually it would get more or official support for IronPython.

With that in mind, I think it would be a nice integration due to IronPython commonality to have Ranorex be able to operate within RobotFramework as a third party test library.

Robot Framework I'm talking about is at http://www.robotframework.org

This also fits in line with related forum post:

http://www.ranorex.com/forum/keyword-dr ... t1561.html

as Robot Framework is a nice keyword based automation framework.

This might increase/improve reason to use Ranorex and Robot Framework too.

Re: Ranorex integration with Robot Framework?

Posted: Mon Feb 07, 2011 9:38 am
by artur_gadomski
From what I've read Ranorex is dropping Phyton in next release.

Re: Ranorex integration with Robot Framework?

Posted: Tue Feb 08, 2011 4:15 am
by daluu
That's too bad. Python is pretty cool.

Why the drop? No/small user base that is using the IronPython support in Ranorex? Or because IronPython not officially or well supported by Microsoft as a true Microsoft language/product? Or some limitations with IronPython for Ranorex's new feature roadmap?

Re: Ranorex integration with Robot Framework?

Posted: Tue Feb 08, 2011 10:43 am
by Support Team
daluu wrote:Why the drop? No/small user base that is using the IronPython support in Ranorex? Or because IronPython not officially or well supported by Microsoft as a true Microsoft language/product? Or some limitations with IronPython for Ranorex's new feature roadmap?
Because of all of the above mentioned reasons.

The main reason is that IronPython does not fit into the new Ranorex 3.X features, since IronPython does not generate real .NET classes in its compiled assemblies. When we think about new features, the limiting factor is always "How are we going to do that with IronPython?". We had the situation that we implemented a feature for C# and VB.Net in reasonable time and then had to spend much more time to find a solution for IronPython. :?
Additionally, SharpDevelop (the IDE Ranorex Studio is based on) will also drop IronPython support in the future.

Regards,
Alex
Ranorex Team

Re: Ranorex integration with Robot Framework?

Posted: Wed Jun 15, 2011 7:07 am
by daluu
FYI, I posted to SharpDevelop forum and seems there might be some confusion about dropping IronPython support. While Ranorex might be dropping it, doesn't seem like it is being dropped from SharpDevelop:

http://community.sharpdevelop.net/forum ... aspx#34558

Also wanted to note, that even w/o IronPython support, one can now integrate Ranorex with RobotFramework.org via the .NET/C# remote server library interface (open source project):

http://code.google.com/p/sharprobotremoteserver/

Now if only someone could put in the time/effort to build said RobotFramework library integration...

Re: Ranorex integration with Robot Framework?

Posted: Thu Jun 16, 2011 2:47 pm
by Support Team
daluu wrote:FYI, I posted to SharpDevelop forum and seems there might be some confusion about dropping IronPython support.
Ooops, then it was obviously me being confused by an early version of SharpDevelop 4.0 not support IronPython or something similar. I really thought they gonna drop IronPython... :oops:
Anyway, the main reasons for dropping direct IronPython support in Ranorex Studio mentioned in my last post are still true ("since IronPython does not generate real .NET classes in its compiled assemblies").
daluu wrote:Now if only someone could put in the time/effort to build said RobotFramework library integration...
I'd love to hear from anyone starting such a project... :D

Regards,
Alex
Ranorex Team

Re: Ranorex integration with Robot Framework?

Posted: Fri May 31, 2013 10:31 am
by atom
Hello.

I've used Robot Framework on Java projects before, and the Selenium keyword library is a time saver.
What robot gives you is the ability for non programmers to write test cases and develop new keywords. What then the automation guys develop is the more complex keywords (e.g. wrappers over ranorex) and deliver them as needed to the manual testers...
The reason why this is beneficial is that now all qa team members can work to develop automated tests rather than a subset of the team, which generates a backlog of work for them.

For this reason I've started to write a ranorex robot keyword library...
When its in reasonable shape i'll post it online to google code

Regards.

Re: Ranorex integration with Robot Framework?

Posted: Fri May 31, 2013 10:36 am
by atom
project is started... (no code as yet)
http://code.google.com/p/ranorex-robot-library/

watch this space...

Re: Ranorex integration with Robot Framework?

Posted: Tue Jun 04, 2013 1:03 pm
by Support Team
For a quick sample of keyword driven testing with Robot Framework in combination with Ranorex, please see the files and descriptions below. This sample is all about keyword driven testing KeePass application.

An illustration of all the tools in use and a sample code snippet is presented in the picture below:
Robot-Framework.png
First of all, the text file containing test cases and keyword definition (alias Test Suite) could look like this:
KeePass.txt
Important: This file has to include a link to a python Library that acts as a wrapper to access the Ranorex functionality.

The wrapper that cares about the connection between the Keywords (RobotFramework) and the Ranorex functionality (Recording Module, Code Module ...) could look like this:
RanorexLibrary.py
Note: At the very top of that file, a reference to a Ranorex Module Library (dll-File) is defined. Here, the Ranorex functionality is packed.
Out of this dll-file, modules are imported. So every Code-Module and Recording-Module has to be imported separately.
The keywords are defined below. These keywords do call the functionality from the imported module (again: code modules and recording modules)

A sample dll-File, the result of a Ranorex Module Library Project (see below), can be downloaded here:
RobotFrameWorkLibrary.rar
Note: Please extract the dll-file from the project

And finally, a sample Ranorex Solution holding some modules to execute the keyword driven tests.
RobotFrameWorkLibrary.rar
Conclusion:
If you're used to work keyword driven and you prefer using the syntax used by the robot framework - the combination of Ranorex and Robot Framework might be a good option to consider. Installation and setting up the environment of course needs some time and tuning. Anyhow, to completely separate test case specification from test automation, Ranorex perfectly executes the test cases defined in a simple text file.

Best Practice:
- Using RIDE (Robot Framework IDE, https://github.com/robotframework/RIDE/downloads) assists with a User Interface. Allows defining keywords as well as running test cases and accessing the reports. You should run RIDE as administrator.

A separate blog containing detailed descriptions and more best practice is in preparation.

Kind regards and good luck!
Roland (E)
Ranorex Team

Re: Ranorex integration with Robot Framework?

Posted: Tue Jun 04, 2013 1:59 pm
by atom
Hiya.

Sounds good.
What i was planning is more generic, in that they keywords would be wrappers around Ranorex API.
e.g. a Keyword could be:

TEXTBOX SETVALUE <xpath> <value>
BUTTON CLICK <xpath>

What can then be done in RF is to build keywords on top of these, so that you can model the application into higher level keywords such as:

|| Keyword || ACTION || ARG || ARG ||
| Login | [Arguments] | ${username} | ${password} |
| | TEXTBOX SETVALUE | ${usernamexpath} | ${username} |
| | TEXTBOX SETVALUE | ${userpassxpath} | ${password} |
| | BUTTON CLICK | ${okxpath} | |

Now from a test point of view you have:

|| Test || ACTION || ARG || ARG ||
| LoginTest | Login | myuser | mypass |

Thats my thoughts as then manual testers can build they "model" keywords as well as test cases.
If its still up to the automation folks to model the AUT, then its still a bottleneck IMHO.

Cheers.

Re: Ranorex integration with Robot Framework?

Posted: Tue Jun 04, 2013 2:02 pm
by atom
The only question that may arise from above is what xpaths does a keyword need
Simple... its always relative to the active window!
The keyword wrappers first find the active window

Re: Ranorex integration with Robot Framework?

Posted: Tue Jun 04, 2013 2:06 pm
by atom
BTW if not using IronPython, but VB/C# you can use:

http://code.google.com/p/sharprobotremoteserver/

However theres several limitations with the above, naming it only is capable of loading one keyword class.
I'm currently writing my own robot remote server :-)

Re: Ranorex integration with Robot Framework?

Posted: Wed Jun 05, 2013 7:34 am
by Support Team
Hi,

thank you very much for sharing your thoughts and opinions. Please keep on posting here regarding this topic. We're highly interested in other ideas, ways and approaches.

Kind regards
Roland (E)
Ranorex Team

Re: Ranorex integration with Robot Framework?

Posted: Fri Jun 07, 2013 6:36 pm
by atom
Hi.

The first stage of integrating Ranorex and Robot Framework was to re-design the .net robot remote server. I found that :

http://code.google.com/p/sharprobotremoteserver/

Wasn't written well. So i've re-written it as a new project called NRobotRemote.
Code will be up in a few days time, but the documentation is there.
Take a look at:

http://code.google.com/p/nrobotremote/

It has several differences to sharprobotremoteserver namely:

- Multi threaded
- Returns Xml-Rpc exceptions
- Service can be hosted in any app
- Uses Log4Net
- Is http ping-able

Theres a few enhancements to do of course.

--> Next stage is writing the ranorex keyword library for the server to load.

Re: Ranorex integration with Robot Framework?

Posted: Tue Jul 02, 2013 11:02 am
by atom
Hello.

I've made a start on the ranorex.robot keyword library
see: https://code.google.com/p/ranorex-robot-library/

At the moment there are only keywords for:
- Application start, stop
- Button
- Text

Basically just enough to do the usual Calculator example.
The Calculator example is available on google code also, as is a sample robot framework report.

All feedback welcome!

Thanks.