-
Notifications
You must be signed in to change notification settings - Fork 659
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
Create "Fat Jar" launcher module: kotest-framework-engine-launcher
that can be executed as a process
#2416
Comments
I've added a standalone module. All that's left is to publish it. |
Probably through a small programmatic API that wrapped arguments and then spawned the It's sort of like the saying: "Nobody ever got fired for buying IBM." 😅 $ javac -d out Foo.java
$ javac -d out -cp out:junit-platform-console-standalone-1.X.X.jar TestClass.java
$ java -jar junit-platform-console-standalone-1.X.X.jar --class-path out --scan-class-path
╷
├─ JUnit Jupiter ✔
│ └─ TestClass ✔
│ └─ test() ✔
└─ JUnit Vintage ✔
Test run finished after 67 ms Usage: ConsoleLauncher [-h] [--disable-ansi-colors] [--disable-banner]
[--fail-if-no-tests] [--scan-modules] [--scan-classpath[=PATH[;|:
PATH...]]]... [--details=MODE] [--details-theme=THEME]
[--reports-dir=DIR] [-c=CLASS]... [--config=KEY=VALUE]... [-cp=PATH
[;|:PATH...]]... [-d=DIR]... [-e=ID]... [-E=ID]...
[--exclude-package=PKG]... [-f=FILE]... [--include-package=PKG]...
[-m=NAME]... [-n=PATTERN]... [-N=PATTERN]... [-o=NAME]...
[-p=PKG]... [-r=RESOURCE]... [-t=TAG]... [-T=TAG]... [-u=URI]... |
lol
no one ever went wrong for using junit.
But mocks ... that's a different story.
…On Mon, 18 Oct 2021 at 10:41, Gavin Ray ***@***.***> wrote:
Probably through a small programmatic API that wrapped arguments and then
spawned the .jar
Feel like the "safe bet" is for me to copy whatever it is that JUnit does
-
https://junit.org/junit5/docs/current/user-guide/#running-tests-console-launcher
It's sort of like the saying: "Nobody ever got fired for buying IBM." 😅
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#2416 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGQMZAEKFYF3J6WDT6TUHQ52ZANCNFSM5CKVQDHQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hey thanks for writing that @sksamuel
I am able to run this speific package, and class and spec using the launcher. For example I can do
And this works but how can I run the subtest let's say |
the -- is our delimiter between nested tests. |
Got it thank you. I am thinking of using this vs the JunitConsoleLauncher |
not, not wildcard, but it automatically prefixes, so |
Thanks for the helpful information. I am happy to do this PR but does it make sense to do? I think this launcher is better for my purpose because we use bazel plus junit console launcher. We have to write a reporter that bridges the bazel with junit and parse XML etc. However this launcher has a good runner, reporter abstraction and I would rather just use this. |
I'm happy to expand the launcher but I'd rather do it better than the
gradle way (we just do that for compatibility).
Perhaps accept a wildcard for --spec and --test or something ?
…On Wed, 31 Aug 2022 at 14:47, Nikunj Yadav ***@***.***> wrote:
Thanks for the helpful information.
Is it possible to extend this launcher to support patterns like it does
with gradle
https://kotest.io/docs/framework/conditional/conditional-tests-with-gradle.html
I am happy to do this PR but does it make sense to do? I think this
launcher is better for my purpose because we use bazel plus junit console
launcher. We have to write a reporter that bridges the bazel with junit and
parse XML etc. However this launcher has a good runner, reporter
abstraction and I would rather just use this.
—
Reply to this email directly, view it on GitHub
<#2416 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGREL7E4XGC6DKFMK7TV36ZDZANCNFSM5CKVQDHQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Amazing ! Yes that would work. I would love to use it in a way where I can target the test and the child test. So let's say if we have
And then we can do
Runs all the describes that have word db in it in all the test specs under It is not important if you don't support
Runs |
I think that is fine. |
Updated my comment with the prefix for spec. |
You could make the PR :) |
@sksamuel Sounds good. I will give it a shot. |
Following conversation on Slack:
Not sure how much merit this has on it's own, but it would allow Kotest to be integrated into tooling that works with any test framework that provides a runnable binary-ish process consuming options via CLI args (as opposed to build-tool specific integrations).
The text was updated successfully, but these errors were encountered: