Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

test.sequential for tests that rely on the sequence #3237

Closed
turadg opened this issue Aug 17, 2023 · 0 comments
Closed

test.sequential for tests that rely on the sequence #3237

turadg opened this issue Aug 17, 2023 · 0 comments
Labels

Comments

@turadg
Copy link
Contributor

turadg commented Aug 17, 2023

The problem

In our organization the vast majority of uses of test.serial are just to enforce that the tests don't run in parallel. They can still be run independently with the -m to select.

In some of our tests, test.serial is used for tests that depend on a sequence of execution. For example, a scenario test in which there are phases (e.g. A, B, C). Each test is both testing a phase and setting up the next phase. We could turn it into one giant test, but they are logically independent and a failure in A can allow B to still be tested and pass. We could have multiple tests like A[setupA,testA] and B[setupA,setupB,testB] but these setups are very slow and we want to do each only once.

Proposal

Maintain test.serial as "not parallel". Consider randomizing the order so that it's not relied upon to be executed in sequence.

Add a test.sequential for tests that actually do depend on the sequence. Selecting one of these with "-m" executes the preceding tests.

@avajs avajs locked and limited conversation to collaborators Aug 18, 2023
@novemberborn novemberborn converted this issue into discussion #3238 Aug 18, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

1 participant