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

Reusing test suites #577

Open
Saga789 opened this issue Apr 15, 2024 · 1 comment
Open

Reusing test suites #577

Saga789 opened this issue Apr 15, 2024 · 1 comment
Labels

Comments

@Saga789
Copy link

Saga789 commented Apr 15, 2024

Hi. Is there a way to use same test suites during pabot execution?
Example:
I have test_suites 1 - 4 and I run two scenarios with robot commands:
robot test_suite1.robot test_suite3.robot test_suite4.robot
robot test_suite2.robot test_suite3.robot test_suite4.robot
I'd like to run the two scenarios simultaneously. I try to use "--processes 2 --ordering order.txt test_suite1.robot test_suite2.robot test_suite3.robot test_suite4.robot" with config file:

{
--suite Suites.Test Suite 1
--suite Suites.Test Suite 3
--suite Suites.Test Suite 4
}
{
--suite Suites.Test Suite 2
--suite Suites.Test Suite 3
--suite Suites.Test Suite 4
}

After running this command first scenario executed test suites 1, 3, 4 but second scenario executed only test suite 2.
How can I run the scenarios as described above?

@joonaskuisma
Copy link
Collaborator

Hi @Saga789 !

The --ordering argument is strictly for grouping suites or tests, as its name suggests. It cannot add or remove tests from execution—it only modifies the execution order, grouping, and scheduling.

If you want to duplicate the execution of specific tests, --prerunmodifier (or in Pabot's case, --pabotprerunmodifier) could maybe be an option—provided you create a suitable modifier yourself.

Alternative Approach

In your example, I’d suggest renaming suites 3 and 4 differently based on whether suite 1 or 2 is their prerequisite. This implies that there is some dependency between these suites, meaning the results of 3 and 4 may vary depending on what was executed in 1 or 2.

Another possible solution could be merging suites 1 and 2 into a single suite and parameterizing the execution. For instance:

  • In args1.txt:
--variable presuite:1
  • In args2.txt:
--variable presuite:2

Then, you could execute:
pabot --processes 2 --argumentfile1 args1.txt --argumentfile2 args2.txt <your_test_folder>

This way, the execution would be controlled by a variable(s), and both scenarios could run in parallel.

Feel free to ask or share more details about the contents of suites 1 and 2.

Hope this helps! 🚀

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

No branches or pull requests

2 participants