how to use dotnet libraries

312 views
Skip to first unread message

Saurabh Bhargava

unread,
Feb 14, 2012, 3:22:12 AM2/14/12
to robotframework-users
There is a tool (for callprocessing) used in my project that is
written in dotnet. After installation, all i see is some ini,html and
mostly .dll files.
I want to integrate this tool into robot framework.
Is it possible.

Regards,
Saurabh

David

unread,
Feb 14, 2012, 1:07:38 PM2/14/12
to robotframework-users
Assuming the DLL files for the call processing tool contain all the
functionality you need for your testing, you may need to write a
wrapper library to "serve" the functional methods/functions in the DLL
to Robot Framework. If the DLL is written very basic (no complex data
structures, simple naming convention, etc.), you might be able to use
just the DLL "as is" depending on how you deploy the DLL with Robot
Framework.

You have two options:

Use IronPython to interface DLL with Robot as a test library. I may be
wrong, others can chime in here, but if you go this route, you will
likely have to write a wrapper in IronPython to expose your DLL to
Robot. There's no ready made solution to just use the DLL with
IronPython yet. Though the following issue has code that will be of
use to you:

http://code.google.com/p/robotframework/issues/detail?id=721

Or plug your DLL into a C# remote library server for Robot. Depending
on how the DLL is designed, you may or may not need to write a wrapper
class around the DLL to use it with the remote server. See this
project for more details:

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

Bryan Oakley

unread,
Feb 14, 2012, 1:17:05 PM2/14/12
to robotframework-users
On Tue, Feb 14, 2012 at 12:07 PM, David <mang...@gmail.com> wrote:
>
> You have two options:
>
> Use IronPython to interface DLL with Robot as a test library. I may be
> wrong, others can chime in here, but if you go this route, you will
> likely have to write a wrapper in IronPython to expose your DLL to
> Robot.

My team uses this method and it works great. The short summary is, we
have a library that takes a DLL as an argument, and that library uses
reflection to find the functions to be exposed as keywords. We use it
like this:

*** Settings ***
| Library | AssemblyLoader | /path/to/something.dll

You then have to run pybot with ironpython so it can load up the dll.

Unfortunately I'm still waiting to hear from our management whether I
can release the code as open source or not, so I can't share the
implementation just yet.

Reply all
Reply to author
Forward
0 new messages