how NRobot Server works

283 views
Skip to first unread message

elab...@handpoint.com

unread,
Aug 2, 2017, 11:27:16 AM8/2/17
to robotframework-users
Hello again,

I'm new to RF. 
I haven been given a custom SDK for Windows applications which belongs to my company. We want to create test automation for it.

After installing Python and RIDE (from Idea) and with the robotframework plugins I see this is enough to run RF files over Python. Good!
For the .NET libraries, I believe the correct approach is to get the NRobot Server running somewhere, I got it through the NUGet imported to my project. 

From this point I got many doubts. 

The idea I got is that I have to:
- Set the NRobot server in some machine to make the .NET libraries available
- Set in that machine a c# file that will make like a bridge between the Robot Framework and (the .NET and our custom .dll). 

Might this be correct or I am just getting all wrong?

I sense it is very well explained, but I am lacking base to understand how it works.

If someone could try to light things up with some examples I would be very thankful!

Regards,

Elena

David

unread,
Aug 2, 2017, 9:00:17 PM8/2/17
to robotframework-users
Hopefully the author of Nrobot, or others in the community will offer you some guidance. What you state is correct for the general workflow (excluding specific details). You should know that generally you have to write or create the C# (test library) file that wraps your custom .NET code that needs to be called/tested so that RF can interface to it. Either you write it or have a developer help you write it.

What is not clear about Nrobot that needs clarification/elaboration? We can't help you further if you don't explain what your remaining problem is.

Btw, in the meantime, or if Nrobot sounds a bit complex, there's an alternate & possibly simpler version you can try, although it has less functionality and is not actively maintained:

elab...@handpoint.com

unread,
Aug 3, 2017, 8:34:31 AM8/3/17
to robotframework-users
Thank you David.

Today I read again the same document and seems clear. 
The most difficult part for me is going to get the C# library written. 
As for the Robot Framework, I tried to run the NRobot.Server.exe but nothing seems to happen; no icon in the windows bar nor process running... Im using Windows 10. The machine where I will place the NRobot server is different but until I got it all working I though setting it up directly in my PC.

Regards,

Elena

David

unread,
Aug 3, 2017, 7:13:45 PM8/3/17
to robotframework-users
Elena, I haven't personally used NRobot server, but I believe it's a command line application, and you should supply it with command line arguments to tell it what to do. I don't think it offers a GUI (unless I'm mistaken) or starts with defaults if you don't provide any argument parameters.

So you should run it from command prompt to see what it gives you. Running by double clicking the EXE from desktop would be the wrong/improper way of running it.

The C# library wrapper should be fairly easy if you know C# or some programming, assuming interfacing to your .NET DLL code is not going to be complicated. Here's a sample of a demo library written for Robot Framework but using a different .NET remote server:


I'd assume Nrobot would use something similar (although maybe with some differences).

elab...@handpoint.com

unread,
Aug 4, 2017, 3:57:08 AM8/4/17
to robotframework-users
Thank you again David, I'm looking now in to the example file you sent me, it's quite explanatory. I also took a look on the sharprobotremoteserver, if for any reason I cannot get along with the NRobot-Server I will try it. 

From the NRobot page to run the file they specify "To start NRobot Server double click on NRobot.Server.exe, the application will start and the icon will be visible in the application tray (near the system clock on Windows 7)." but it is true that it got a conf file that I have still not modified so that could be the reason. Or maybe it doesn't work in W10.

I'll keep working on it.

Elena

elab...@handpoint.com

unread,
Aug 4, 2017, 7:23:22 AM8/4/17
to robotframework-users
OK.
So I have started the C# library and edit the NRobot.Server.exe.config file giving the path to my library in the 
<assemblies>
<add name="path to my library............

I run then the .exe but it closes immediately, in the windows system report there is an ugly crash error leading no where.
Moved the whole thing to a Windows 7 machine and got the same problem, it crashes.

Please some help here,

Thanks,

Elena

David

unread,
Aug 4, 2017, 7:00:31 PM8/4/17
to robotframework-users
You'll want to get the crash log/report so we know why it's crashing, maybe submit a bug/issue to Nrobot project, if the error doesn't sound generically Windows specific.

Be sure you are running the right compiled EXE version against the expected .NET framework version running on Windows 7/10. A version mismatch could be a problem. That along with 32-bit vs 64-bit EXE. Make sure it matches your platform and that the 32/64-bit between nrobot matches your C# library.

elab...@handpoint.com

unread,
Aug 7, 2017, 4:35:02 AM8/7/17
to robotframework-users
Hi David,

I have pasted the error on https://github.com/claytonneal/nrobot-server/issues/3, my .NET framework is 4.6.1

Trying to gain some time I tried to run the sharprobotremoteserver but I also got problems... I have compiled the xml-rpc as requested towards .NET 4.6.1, then run the batch and it will say:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'CookComputing.XmlRpcV2, Version=2.5.0.0, Culture=neutral, PublicKeyToken=a7d6e17aa302004d' or one of its dependencies.

In the command line I provided name of my custom library, and specified the namespace and class. I dont know how the freshly compiled xml-rpc library enters the game here.

Maybe you know what I am doing wrong?

Elena

David

unread,
Aug 8, 2017, 12:25:21 AM8/8/17
to robotframework-users
For sharprobotremoteserver, if compiling with the batch file, be sure to read the comments in batch file so you compile it correctly. XML-RPC.NET DLL has to be in same local path as the batch script & the source code to compile. The batch file does not compile your custom library, it creates the remote server EXE and the example library DLL for your own library, you'll have to edit the batch file to compile that following the example library and add parameters defining any dependencies to other DLLs your library might have. You also have to edit the batch file to point to the right version of .NET framework you're compiling for, it defaults to .NET 2.0.

Alternatively, if that's too confusing, create a new console project in Visual Studio to compile sharprobotremoteserver (robotremoteserver.cs that is), with a library/link reference to the XML-RPC.NET DLL or source code. Then create a new class library project in Visual Studio to compile your custom library.

elab...@handpoint.com

unread,
Aug 8, 2017, 8:05:47 AM8/8/17
to robotframework-users
Hi David,

I could not make it work. I put the remote server approach on stand-by,I think is the desired approach in my case. But for now Im back on IronPython which I managed to install properly, to see if I can move on with this C# library.

Thank you again!!!

Elena

Denis Lrv

unread,
Aug 25, 2017, 12:09:50 AM8/25/17
to robotframework-users
Elana

At my company we are using NRobotRemote extensively, its a very powerful tool.
Do not give up on it yet!

The best way to use NRobotRemote is to use nugget.
- create a C# library project.
- add NRobotRemote in you project via VisualStudio Package Manager UI ( https://docs.microsoft.com/en-us/nuget/tools/package-manager-ui ). This will also install dependency packages (like xmlrpcnet and log4net).
  Build your project, and in your project binary output (bin\release, bin\debug), you should see NRobotRemote executable/lib, xmlrpc lib and log4net lib.
- once you project is build, to run NRobotRemote you have 2 choices...
  1- manually via command line or shortcut
  2- via VisualStudio project settings ( https://msdn.microsoft.com/en-us/library/2kf0yb05.aspx ), you basically set "Command line arguments" to run NRobotRemote (with the same parameters as you would use by invoking it via command line)

Regards, DL

elab...@handpoint.com

unread,
Aug 25, 2017, 3:28:42 AM8/25/17
to robotframework-users
Hello Denis, thanks!

Looks easy, I use Visual Studio so it is definitely worth a try. For now Im running RF under IronPython (so between the tests and the C# there is a .py library linking both) but the plan is to switch to NRobotServer whenever I got the C# library and the test suite more developed. I guess then the C# library will only have to be refactored to match the methods names with the RF keywords... please someone let me know if I am missing something. I'm learning RF from the scratch but everyday it's coming more easily and it's kind of funny.

Elena

Chinmaya Karve

unread,
Apr 16, 2018, 12:13:34 PM4/16/18
to robotframework-users
Can anybody tell me how to get the nrobotserver working on Win7? I have followed each step, and every time I open the nrobot.server.exe, it crashes giving me kernelbase.dll error.
Reply all
Reply to author
Forward
0 new messages