Pabot and setup

2,421 views
Skip to first unread message

Tatu Aalto

unread,
Feb 12, 2015, 3:41:19 AM2/12/15
to robotframe...@googlegroups.com
Ugh

I would like pabot to run my suites in parallel, which it can do in quite simple way. But if I need to perform common setup for all suites and that setup should be executed only one time, I do not get it working properly with pabot. Example if I have the test suite structure like in the suites.zip file. Is there way to get the "Setup"-keyword from the __init__robot to be executed only one time with the pabot?

-Tatu




suites.zip

Mikko Korpela

unread,
Feb 14, 2015, 5:43:27 AM2/14/15
to robotframe...@googlegroups.com
Hi Tatu,

Currently this is not possible "out-of-the-box" but should be quite easy to add it to PabotLib capabilities to have a keyword for example "Run Only Once" or something similarly named.

There currently is no direct way to communicate between the processes.

Teardowns on the other hand might be a bit trickier to implement as the last one should actually run the keyword and wait for everyone..

Cheers,
Mikko

Tatu Aalto

unread,
Feb 14, 2015, 6:57:03 AM2/14/15
to Mikko Korpela, robotframework-users

Ugh

My need is only in the setup. I did have not so elegant solution in my mind. Call pybot first to only do the run once setup, then call pabot to run the parallel test and combine the result with rebot. But implementing the Run Only Once keyword would definitely ease the complexity.

Can not even think how to make the Run Only Once work in the teardown.

-Tatu
Send from my mobile

--
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 http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Ritu Mittal

unread,
Jul 16, 2015, 9:43:16 AM7/16/15
to robotframe...@googlegroups.com, mikko....@gmail.com
Hi Mikko,
 
I am using pabotlib.run only once keyword in two processes, which have different test setup and resource files. But I still get the error "Waiting for lock to release".
Any suggestion?

In addition to this issue, in first process if I run the test cases on a number a different browser instances, during test set up, It shows the same error "Waiting for lock to release" but tests does not fail.

Regards,
Ritu

Mikko Korpela

unread,
Jul 16, 2015, 10:21:00 AM7/16/15
to Ritu Mittal, robotframe...@googlegroups.com
Hi Ritu,

Identification of what is to be run only once, is based on the keyword name. If the two keywords have the same name, they are identified as same keyword.

It could also be that one of the keyword never returns.

Hope this helps,
If not you can send me privately a sample log file.

Cheers
-- 
Mikko Korpela

Kashika Gupta

unread,
Jun 30, 2017, 5:57:33 AM6/30/17
to robotframework-users
Can anyone here help me in providing information about how actually Robot Framework and Pabot are communicating?

Tatu Aalto

unread,
Jun 30, 2017, 10:46:55 AM6/30/17
to Kashika Gupta, robotframework-users
Ugh

Pabot has two sides: 
1) The pabot which allows you to execute test suites in parallel
2) PabotLib which provides library keywords to Robot Framework and allows to share stuff between individual Robot Framework test executions

When talking about pabot and Robot Framework, they are not communicating. Pabot has parsing logic to gather information about suites that will be executed, runs suites in parallel based on the information gathered and with some configuration options, gather results when all runs are completed and combine unified result from individual test suite runs.

When the PabotLib is used, the pabot will setup the library by using the remote library API[1]. The library is running in separate thread and separately from the Robot Framework executions. The library is started before the test suite execution start and the logic of the library, including keywords, is build in a way that allows sharing stuff between different Robot Framework executions.

My explanation is only a high level view and I can't recall or know all small details. If need a better description, then Mikko is able to give you more detailed answers, if you need one.

-Tatu
Send from my mobile

--
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-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.

Sathish

unread,
Aug 2, 2017, 5:03:08 PM8/2/17
to robotframe...@googlegroups.com
To Authors and Others..
 
I am able to achieve parallel execution of Robot Framework tests using Pabot in my system. Pardon my technical knowledge, I see there is not enough instruction how to distribute tests to different machines (System1 and System 2) or not possible to do distribute testing.

My Scenario:
I have two VM machines with Windows operating system and have Robot framework library (Selenium2library, Autoit, Angularjs) and tests in my system. I wanted to trigger execution command from my system and execute tests in remote VM machines. Could anyone provide step by step instructions like what is needed in VM (remote) machines, where to start remote interface, a sample pabot command providing VM IP addresses and other options.

It would be great if shed some light on this.

Thanks in Advance....
Sathish

Sathish

unread,
Aug 14, 2017, 10:53:11 AM8/14/17
to robotframe...@googlegroups.com
Guys... I have figured out to do parallel and distribution testing in Robot framework. Thought of sharing to Robot Framework users. Before, I knew about pabot, I tried to execute test using pybot command in selenium grid, it was opening one test at a time although i have multiple nodes so I dropped idea of using Robot Framework+Selenium Grid for parallel and distribution testing.

Then, I came to know about Pabot, used it in my project. But, it executes multiple tests in parallel but distribution of test to other system was not feasible to my knowledge or not enough documentation. I have always thought and trying about using Robot Framework+Pabot+Selenium Grid and recently I tried it and worked great.



 I created Hub and nodes using Selenium Grid and used Pabot to trigger multiple processes at a time.

In open browser keyword, use
open browser  about:blank  Firefox  None  http://IpAddress:Port(of selenium grid hub)/wd/hub  ff_profile_dir=${Profile}

execute the test using pabot... Parallel and distribution testing achieved.


Only problem/drawback is, I could not pass Chrome options to Open browser keyword for chrome browser as Open browser does nothing using chrome options.


Hope this will be useful for some users. please refer document how to use pabot and selenium grid... have a great day!

Radhika Swaminathan

unread,
Sep 25, 2017, 2:10:08 PM9/25/17
to robotframework-users
Hi Sathish,

I am new to robot framework remote execution.

Can you please give me step by step process to run my local test on a remote windows server using Pabot and selenium grid

Thanks
Radhika
Reply all
Reply to author
Forward
0 new messages