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
[feature request] grouping of serial tests #2322
Comments
Having a quick look at the tests, if you could write the files in temporary locations you wouldn't have to worry about test files running concurrently. That's really how this is meant to be used. We have some issues around managing restricted resources during a test run, which if it had actually existed you could have used here, but it doesn't yet 😄 (I'm closing this issue for housekeeping purposes, but let's keep the conversation going.) |
Hey. I am not sure if I get what you wanted to say.
From the above line, I understand that concurrency is not possible if I am writing files at a location. I wanted concurrency as some of my files are independent of these two files which need to be run serially. I didn't really get that Could you please reference the issue regarding the same, if time permits, so that I can refer it and see the progress. Thank you. |
As you found there's two levels of concurrency:
The best approach is to make it so each test file can run independently of the other. In your case that means they should use separate paths for the files they write to disk. I have some service integration tests that rely on a database, and each test file (which starts its own copy of the service) is actually using a different database instance, thus avoiding any concurrency issues when multiple test files run at once. This kind of separation is not always possible, especially with certain databases or third party resources.
This one I think: #1366 |
Problem Description
My use case is the following:
I made two test files.
test file 1
test file 2
I wanted the test cases of both of these files to run serially and the rest of the test cases concurrently, but presently, there is no provision of doing that in case of multiple files, therefore I had to run
ava
using--serial
flag, but using this the testing speed slows down as all the tests are run serially.Feature Request
It would be good if we had the option of grouping the tests, so that we can select different groups of test cases that share the same resource to run serially but tests of different groups can be run concurrently.
Open to discussion.
The text was updated successfully, but these errors were encountered: