-
Notifications
You must be signed in to change notification settings - Fork 42
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
Take into account TaskDef
s with TestSelector
s
#108
Conversation
@eed3si9n what do you think about this approach? |
Could you elaborate what you mean here please? afaik junit-interface distinguishes what's passed into By build server, do you mean an implementation of BSP server? |
Yeah, sure. I'll start from the very beginning, just to ensure you have the necessary context. It was my mistake not doing it from the very beginning. I wanted to implement vscode's testing API for Scala in Metals and I managed to implement running whole test suites/classes via BSP's debug method and DAP. Since all well-known build servers such as sbt or bloop (there's also mill) use the Having finer granulation of tests is my next goal. However, it turned out that it's not that easy since most of the already implemented test interfaces don't take into Now I should be able to answer your first question which was:
So here, I'm not talking from the
Yes
There is a proposition to extend BSP debug method with a new request kind which will provide necessary information about tests that are about to run. I started with the JUnit since it's the easiest one to start because test methods are annotated - hence methods names are easy to find and pass into this whole machinery.
No, it shouldn't since this change doesn't affect the way in which sbt or bloop uses |
Thanks for the context. I guess having the concept encoded as test-interface class sounds as good as a spec. Do you think it's possible to implement some test, or it's not possible as a scripted test (if it's too cumbersome it's fine)? |
Actually, I have an idea how to test this. |
cb769a9
to
8178d27
Compare
Scripted test implemented, it tests both previous behavior and the new one. |
8178d27
to
a13b847
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
https://github.com/sbt/junit-interface/releases/tag/v0.13.3 is on its way to Maven Central. |
Thanks, @eed3si9n! |
more information can be found at sbt/junit-interface#108
more information can be found at sbt/junit-interface#108
More information can be found at sbt/junit-interface#108
More information can be found at sbt/junit-interface#108
More information can be found at sbt/junit-interface#108
More information can be found at sbt/junit-interface#108
More information can be found at sbt/junit-interface#108
As far as I understand,
TestSelector
can be used to createTaskDef
which should only execute selected tests from the given test class.Motivation: from the build server perspective I want to be able to run only a single test from the selected test suite.
I didn't find a better alternative to
RunSettings.testFilter
.