-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
enumerate_tests takes a long time #195
Comments
Yeah, enumeration is very slow for some reason, I couldn't find any good alternative to do the same (besides greping all files, but I'm not sure If I want to do that). I skip enumeration if you perform reruns ( I don't remember now why I don't just rely on logs from the run instead of enumerating tests. I will investigate that :). |
Could you also create a thread there: https://developer.apple.com/forums/topics/developer-tools-and-services/developer-tools-and-services-xcode Apple engineers reply there quite often. Maybe they would be able to help. If not, you can also create a ticket in Feedback Assistant. I reported one issue with their CLI tool and they fixed it, so there is a better chance of getting fix than if you report iOS bugs :D. I guess CLI tools are not as crowded as iOS SDK :). |
I checked and potentially it could be changed to generate the tree dynamically while running tests. However, I'm not sure when I'll find time to try it. If you have some spare time, I could give you some directions how to approach it. There are 4 main things in this feature:
So, to implement this feature:
|
I am not sure if I have time to do that right now, but I certainly will look into that as soon as I can. Thank you for your detailed response! |
Just to let you know, I started working on it :) |
@Almaz5200 I finished it, would you like to try it? #198 |
Sorry for not replying earlier. Thank you, I really appreciate it! I'll give it a try today and will get back to you |
@wojciech-kulik it works wonderfully! I would even say it's more correct now. Previous versions showed some phantom test class for every test suite due to the fact that we subclass from our own "MyTestCase" rather than "XCTestCase", and this is now gone as well! But most importantly of course its really quick now. Also there is another improvement as a side effect of that – Test explorer now only shows tests that you ran, which removes all the clutter and makes it a lot more useful, at least for me :) |
Great to hear! 🔥 I'm merging those changes then :) |
@Almaz5200 you might be interested in checking out #201 :) |
👀 I certainly am! Thank you for letting me know, I'll try that as soon as I can and will let you know how it goes! |
Tests enumeration takes a really long time in a big project, comparable to the time it takes to run the tests. Looking at the logs of running -enumerate-tests manually I see what can only be explained by launching the test classes without running them. We have some logic for tests in obj-c -load method that runs on module initialization and I see a lot of those logs, which implies those tests launching. For example, in my project for an incremental build of a single test class it took 20 seconds to build and 211 seconds to enumerate the tests again. Is there a way to either disable test explorer and enumeration fully, enumerate only manually, or enumerate while running the tests?
The text was updated successfully, but these errors were encountered: