-
Notifications
You must be signed in to change notification settings - Fork 154
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
Convert Infinitest from a facet to a tool window #334
Conversation
Add a project-level ToolWindow and initialise the InfinitestLauncher as a project-level service. Use the platform message bus for the communication between the Infinitest runner and its listeners Display the failed tests grouped by module (instead of showing a window per module) Fixes #29 Fixes #173 Fixes #193 Fixes #216 Fixes #237 Fixes #327
Add a project-level ToolWindow and initialise the InfinitestLauncher as a project-level service. Use the platform message bus for the communication between the Infinitest runner and its listeners Display the failed tests grouped by module (instead of showing a window per module) Fixes #29 Fixes #173 Fixes #193 Fixes #216 Fixes #237 Fixes #327
…test/infinitest.git into pr-infinitest-not-a-facet
What is strange, that error seems to break the ability to execute tests in a regular way. Steps to reproduce:
Excepted behavior:
Current behavior:
|
Another perception. I wonder, how would it be best to exclude some modules from the run. Somehow in Idea? Or the Infinitest's configuration file should be used? |
I think the issue you're seeing is because of this filter: https://github.com/infinitest/infinitest/blob/master/infinitest-runner/infinitest.filters
Currently the results are displayed as a tree and the modules are the top-level elements, maybe I could add an action to enable/disable the tests there. Maybe right click -> disable/enable? |
You are right. The Infinitest project itself has many Anyway, it would be good to catch that kind of exceptions - re-running tests is globally broken for that project. |
Sounds good for me. Please do something that is easy to implement for you. There could be some "heavy" modules (e.g. acceptance tests) in some projects which are not intended to be executed with Infinitest. |
Now it should be possible to disable/enable the tests by right-clicking on it in the results tree |
I hit the following error on loading the infinitest project itself with the new version of the plugin (still IDEA 2022.1):
Probably you confused the import in |
After fixing that, I have:
in the JUnit 5 project. |
Btw, maybe it was a "case" also before, however, it seems that infinitest core is shared across many open projects. I one project, in the logging tab, I see changed files also from the other project(s). |
Hum, I agree that this import is not the best and should be fixed but it has been there for 4 years, so I'm not sure why you got that error. TestNG should be on the classpath since it is a (transitive) dependency. For the logs currently there's one static logger for the entire application and every view is a listener, so indeed this should be fixed. I think it could be better to make this change in a separate PR, that one is quite big already. Thanks a lot for testing, it is very much appreciated! |
Sorry for suspicion. Seeing that error for the first time, I though I've just made that statement. What is strange, today I rebuild the project and it works... Two spotted things: |
After your last commit, it is fixed. Thanks. I don't know how would it be hard to implement, however, the enabled/disabled state is not kept across Idea restarts. Having many modules to disable, it would be inconvenient to do it every time the project is open. |
Yes, I had the same thoughts |
It should save the project-level and module-level enabled/disabled switches now |
cd5757f
to
82a4525
Compare
Hello @szpak, I was wondering if you had time to test the last changes (I just made a very minor tweak) |
Btw, I created #343 to cover a problem with ".exampletests." |
Right, Infinitest won't run the tests until a build is completed, this was already the case from what I've seen. |
Btw, what do you mean by "the project-level enabled/disabled switches"? How can I disable Infinitest completely for the project (to do not load at all) at the next project opening? A sample use case. A big legacy project (with many modules) and slow integration tests. On the first rebuild, they would try to be executed. All the modules can be disabled (which is persisted!), but still it not very handy. If it is currently not possible, I can create a separate issue for it, just to remember about that limitation. |
Thanks for the screenshots - I wasn't aware it works that way (and that it is persisted).
It should not be a problem. After the project it open you have to hit "Build project" to generate classes, so when one will click "x" before, no tests should be executed by Infinitest. |
It wasn't persisted before, but with the changes in that PR it should be ;) |
Currentl Infinitest is a facet in the IntelliJ plugin, this requires users to add the facet to every module. It also creates a window per module so it is not user friendly for large multi module projects.