Parallel Test Execution With Ride

1,306 views
Skip to first unread message

James

unread,
Sep 13, 2012, 5:56:30 PM9/13/12
to robotframe...@googlegroups.com
Hi All,

Recently like a lot of people here I tried to get robot framework to run my scripts in parallel.  I found the links below and thought it would be easy and it was, until I tried to get them to execute through Ride.  Unfortunately my Python is awful but I was able to hack together a working prototype.  The prototype takes the argument file generated by Ride and scrapes it for tests, and then passes them to a custom script file, originally I had this as a jybot/pybot instance but this seemed to be a better way of proceeding.  At present it doesn't deal with tags but I can't imagine that will be hard to add.  Again this is a prototype, be cautious when using it and excuse the code (It's mostly taken from the work done on the Selenium Grid page linked below, thanks for that btw).

I hope these links help someone.  At worst it consolidates all of the posts I have found regarding parallel testing in robot.  To run just set the parabot.bat file as your custom script in Ride.

ParabotConfig.py - http://pastebin.com/JXQMKT5q

I will try to keep these up to date as I clean/add functionality.


Other helpful links

Parallel Testing with CI

Daniel Aquino

unread,
Sep 13, 2012, 8:05:22 PM9/13/12
to jamesf...@gmail.com, robotframe...@googlegroups.com
You could parse the files directly using the robot framework libraries.

A small command line tool that takes similar arguments as pybot and then returns a list of test cases broken out into the desired number of groups would be awesome..  While your there throw in OR ability for --include/exclude ..

Here is a small example I started to play with:

#!/usr/bin/env python
from robot.parsing import TestCaseFile
suite = TestCaseFile(source="./Google.txt").populate()
print "suite: "+suite.name
for test in suite.testcase_table:
        print "\ttest case: "+test.name
        print "\t\tdoc: "+test.doc


Right now for I just use a Jenkins matrix job to run various browser/os/tags combinations at the same time.



--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/robotframework-users/-/7r1Ak3NAqNEJ.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.

David Losinski

unread,
Sep 14, 2012, 4:20:14 AM9/14/12
to robotframe...@googlegroups.com
Hi All,

About a year ago we I started looking at the same issue and found that the script from http://code.google.com/p/robotframework-seleniumlibrary/wiki/UseSeleniumGRIDwithRobotFramework  only looks for tests at the top level of the suite (https://groups.google.com/forum/?fromgroups=#!searchin/robotframework-users/david$20losinski/robotframework-users/66RKX7eBUpY/U53MtVhgyncJ). Here is my updated code which fixes the issue and may be of some use to you as it handles include/exclude tags. I have never tried to run this script with ride as we use it on our CI system, but my changes may be of use to someone.

David
parabot.py

James

unread,
Sep 16, 2012, 6:06:29 PM9/16/12
to robotframe...@googlegroups.com
Thanks for that David, that script won't work with Ride for the same reason your initial one didn't work, they pass everything through an argument file.  I'm sure someone though will find that link useful.  I started with your example from that Selenium Grid page so thanks for writing that.

James

unread,
Oct 31, 2012, 6:19:20 PM10/31/12
to robotframe...@googlegroups.com
Hi All,

Just wanted to keep this thread up to date.  I have updated my parabot with the changes David posted (http://pastebin.com/Y2hfGip7).  The script now works with include/exclude tags.

Thanks again to all the contributors of RF and the people that helped with this script.  I'm enjoying learning python as I go through.

Cheers,
James
Reply all
Reply to author
Forward
0 new messages