Execution Setup and Teardown with using pabot?

297 views
Skip to first unread message

sami.sa...@q-factory.fi

unread,
Sep 20, 2018, 3:14:24 AM9/20/18
to robotframework-users
Hi,

I have challenge to solve: I am using pabot with 4 processes at the moment. I would like to start SUT logging (collecting daily log is not the option, too big) in the beginning of execution and stop logging, when last bot is ready. My understanding is, that Robot is supporting Suite Setup and Teardown at the moment. Is there anyway to have "Execution Setup and Teardown" functionality?

Could you have some good idea(s) to implement SUT logging with pabot? 

Thanks in advance.

Cheers
Sami

Tatu Aalto

unread,
Sep 25, 2018, 2:46:52 AM9/25/18
to Sami Savolainen, robotframework-users
Ugh

Interesting question. The feature you are requesting is not part of the Robot Framework, because it doesn't see that it's executed by pabot and Robot Framework does not see other Robot Framework processes are also running. Instead the feature belongs to the pabot, because it has the knowledge about the full execution.

The good news is that, starting the logging is possible by Run Only Once [1] keyword. The bad news is that stopping the logging is not possible out of the box, but there are workarounds. Example you could move the logging stopping outside of the test execution or you could implement a feature for pabot that is a counterpart for the Run Only Once keyword. Also I am sure that many other ways also exist.

--
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.

Aleh Barysevich

unread,
Sep 25, 2018, 4:03:35 AM9/25/18
to robotframe...@googlegroups.com
I had similar problem some time ago.  I wanted to start process before tests and kill process after test execution and to be able to run multiple suits simultaneously. I ended up increasing counter in Suite Setup and decreasing in Suite Teardown and running/killing process based on counter.
Aleh Barysevich


sami.sa...@q-factory.fi

unread,
Oct 2, 2018, 6:56:41 AM10/2/18
to robotframework-users
Thanks Tatu and Aleh,

Actually this Aleh idea is interesting, Suite counter idea is maybe good one. Run Only Once could be used in Setup but sometimes we are executing without pabot, then it's not valid solution.

Thanks for your ideas!

-Sami


tiistai 25. syyskuuta 2018 11.03.35 UTC+3 Aleh Barysevich kirjoitti:
I had similar problem some time ago.  I wanted to start process before tests and kill process after test execution and to be able to run multiple suits simultaneously. I ended up increasing counter in Suite Setup and decreasing in Suite Teardown and running/killing process based on counter.


On Tue, 25 Sep 2018, at 08:46, Tatu Aalto wrote:
Ugh

Interesting question. The feature you are requesting is not part of the Robot Framework, because it doesn't see that it's executed by pabot and Robot Framework does not see other Robot Framework processes are also running. Instead the feature belongs to the pabot, because it has the knowledge about the full execution.

The good news is that, starting the logging is possible by Run Only Once [1] keyword. The bad news is that stopping the logging is not possible out of the box, but there are workarounds. Example you could move the logging stopping outside of the test execution or you could implement a feature for pabot that is a counterpart for the Run Only Once keyword. Also I am sure that many other ways also exist.

On Thu, 20 Sep 2018, 10:14 , <sami.sa...@q-factory.fi> wrote:
Hi,

I have challenge to solve: I am using pabot with 4 processes at the moment. I would like to start SUT logging (collecting daily log is not the option, too big) in the beginning of execution and stop logging, when last bot is ready. My understanding is, that Robot is supporting Suite Setup and Teardown at the moment. Is there anyway to have "Execution Setup and Teardown" functionality?

Could you have some good idea(s) to implement SUT logging with pabot? 

Thanks in advance.

Cheers
Sami


--
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 robotframe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
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 robotframe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aleh Barysevich


Reply all
Reply to author
Forward
0 new messages