Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

required a support adding new flag which will wait before trigger next suite #592

Open
kbogineni opened this issue Aug 6, 2024 · 4 comments
Assignees

Comments

@kbogineni
Copy link

kbogineni commented Aug 6, 2024

Hi
I am using pabot for robot parallel execution and I have a requirement of executing the suites in parallel but need to some time to between each suite. For example, I have suite1 and suite2 and I need to trigger them with some delay as below

Suite1 and wait $DELAY and Suite2

Could you please look at this and implement? it will be helpful for others also

@joonaskuisma joonaskuisma self-assigned this Feb 8, 2025
joonaskuisma added a commit to joonaskuisma/pabot that referenced this issue Feb 15, 2025
- Fixed initial implementation
- Updated documentation
@joonaskuisma
Copy link
Collaborator

Hi @kbogineni !

The #SLEEP keyword has been implemented and is just waiting for review and merging into the main branch. If you get a chance, please take a look at #621.

Any feedback is highly appreciated! 😊

@kbogineni
Copy link
Author

@joonaskuisma how the pabot command looks if this is fixed

@joonaskuisma
Copy link
Collaborator

joonaskuisma commented Feb 22, 2025

Here is section of updated README.md (You can find it my fork and feature branch also):

By using the command #SLEEP X, where X is an integer in the range [0-3600] (in seconds), you can define a startup delay for each subprocess. #SLEEP affects the next line unless the next line starts a group with {, in which case the delay applies to the entire group. If the next line begins with --test or --suite, the delay is applied to that specific item. Any other occurrences of #SLEEP are ignored.

The following example clarifies the behavior:

pabot --process 2 --ordering order.txt data_1

where order.txt is:

#SLEEP 1
{
#SLEEP 2
--suite Data 1.suite A
#SLEEP 3
--suite Data 1.suite B
#SLEEP 4
}
#SLEEP 5
#SLEEP 6
--suite Data 1.suite C
#SLEEP 7
--suite Data 1.suite D
#SLEEP 8

prints something like this:

2025-02-15 19:15:00.408321 [0] [ID:1] SLEEPING 6 SECONDS BEFORE STARTING Data 1.suite C
2025-02-15 19:15:00.408321 [1] [ID:0] SLEEPING 1 SECONDS BEFORE STARTING Group_Data 1.suite A_Data 1.suite B
2025-02-15 19:15:01.409389 [PID:52008] [1] [ID:0] EXECUTING Group_Data 1.suite A_Data 1.suite B
2025-02-15 19:15:06.409024 [PID:1528] [0] [ID:1] EXECUTING Data 1.suite C
2025-02-15 19:15:09.257564 [PID:52008] [1] [ID:0] PASSED Group_Data 1.suite A_Data 1.suite B in 7.8 seconds
2025-02-15 19:15:09.259067 [1] [ID:2] SLEEPING 7 SECONDS BEFORE STARTING Data 1.suite D
2025-02-15 19:15:09.647342 [PID:1528] [0] [ID:1] PASSED Data 1.suite C in 3.2 seconds
2025-02-15 19:15:16.260432 [PID:48156] [1] [ID:2] EXECUTING Data 1.suite D
2025-02-15 19:15:18.696420 [PID:48156] [1] [ID:2] PASSED Data 1.suite D in 2.4 seconds

@joonaskuisma
Copy link
Collaborator

Hi @kbogineni !

What you think about this solution? (See my previous comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants