How to speed up execution of Robot Framework in C#/Iron Python?

613 views
Skip to first unread message

Pether Pettersson

unread,
Mar 3, 2016, 7:38:20 AM3/3/16
to robotframework-users
I am running Iron Python in my C# WPF application to be able to use Robot Framework, everything works, but, it takes a lot longer to execute the tests.
I have about 50 simple test cases split up in 20 test suites, they are all just a simple LOG-keyword.
If i run the root folder with just python everything runs in just a few hundred milliseconds, running them in RIDE takes a bit longer, but still not even a second.
Running with IronPython takes a bit more then 2 seconds, and running trough my application takes 10 seconds.

What steps can i take to improve the time? We have a total time of around 7-8 hours when running all our tests, so adding such a large extra time would be pretty bad.
I'm creating my suite by using robot.running.builder.TestSuiteBuilder and passing it a path to the root folder. Could this be a source of extra time? Would it go faster if i created the test cases individually and added them together?

I have found no difference in time when importing the modules(executing "from robot etc etc import this and that") in the c# app, or just in the python script. As well as no improvement when compiling the python file.

Am i just running against a wall here and iron python is that much slower no matter what?

David

unread,
Mar 3, 2016, 11:17:44 PM3/3/16
to robotframework-users
Do you need IronPython only to interface to some C# library/code to test against/with? Meaning otherwise you could run your tests in pure Python? If so, one thing you could try is to run your C# app/code through the .NET remote server (NRobotRemote) and import that as a remote library in test cases rather than as local library via IronPython. Then you should be able to run RF tests in Python and they'll just talk to the C# app over the remote library server.

Pekka Klärck

unread,
Mar 4, 2016, 8:13:02 AM3/4/16
to Pether Pettersson, robotframework-users
Hello,

IronPython is slower than CPython but it shouldn't be this much
slower. Do you have interest to profile where the time is spent? If
clear bottlenecks are found, the code could hopefully be made faster.
I have never profiled Robot on IronPython, only on CPython, and don't
even know can you use Python's standard cProfile or should you rather
use some .NET tools.

Cheers,
.peke
> --
> You received this message because you are subscribed to the Google Groups
> "robotframework-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to robotframework-u...@googlegroups.com.
> To post to this group, send email to robotframe...@googlegroups.com.
> Visit this group at https://groups.google.com/group/robotframework-users.
> For more options, visit https://groups.google.com/d/optout.



--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
Reply all
Reply to author
Forward
0 new messages