Skip to content
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

Gazelle support for junit4 #43

Open
gn-harness opened this issue Jun 29, 2022 · 1 comment
Open

Gazelle support for junit4 #43

gn-harness opened this issue Jun 29, 2022 · 1 comment

Comments

@gn-harness
Copy link

Hey! I am trying out gazelle java extension for https://github.com/harness/harness-core

After running the tool, I noticed that the java_test_suite it generates has runner5 hardcoded and its adds respective runtime_deps also. We are still using junit4 -- can I somehow configure it to generate runner for junit4 without any runtime deps?

@shs96c
Copy link
Collaborator

shs96c commented Jun 29, 2022

It would be possible to determine which runner to use by looking for the presence of the org.junit.Test annotation in a test file. If it's there, the chances are that this is a junit4 test.

Having said that, junit5 can run those tests with the vintage runner, so we should also provide a config option in build files that allows one to determine the runner to use.

illicitonion added a commit to illicitonion/rules_jvm that referenced this issue Jul 5, 2022
Also, have them be junit5 tests not junit4.

In bazel-contrib#43 we will attempt to auto-detect junit4 vs junit5, so our
test-cases which assert junit5 suites are generated should _actually_ be
junit5 tests, so that this test keeps being valid after that issue is
resolved.
illicitonion added a commit to illicitonion/rules_jvm that referenced this issue Jul 6, 2022
Also, have them be junit5 tests not junit4.

In bazel-contrib#43 we will attempt to auto-detect junit4 vs junit5, so our
test-cases which assert junit5 suites are generated should _actually_ be
junit5 tests, so that this test keeps being valid after that issue is
resolved.
illicitonion added a commit to illicitonion/rules_jvm that referenced this issue Jul 7, 2022
Also, have them be junit5 tests not junit4.

In bazel-contrib#43 we will attempt to auto-detect junit4 vs junit5, so our
test-cases which assert junit5 suites are generated should _actually_ be
junit5 tests, so that this test keeps being valid after that issue is
resolved.
illicitonion added a commit that referenced this issue Jul 18, 2022
Also, have them be junit5 tests not junit4.

In #43 we will attempt to auto-detect junit4 vs junit5, so our
test-cases which assert junit5 suites are generated should _actually_ be
junit5 tests, so that this test keeps being valid after that issue is
resolved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants