Commit Graph

1708 Commits

Author SHA1 Message Date
Bart van Helvert
05ac916353 Revert "Making junit plugin using default test runner in case Spock testing framework is detected in classpath."
This reverts commit 20d138df183f8dfdb3121986498b080d4a61a171. #IDEA-363841 Fixed


IJ-CR-152725

GitOrigin-RevId: 673890065431aa2aa17f4bb8cdfe52462078533a
2025-01-13 12:29:42 +00:00
Ilia Kirianovskii
caffe82e2d [junit] Don't override main class if !null in TestObject#createJavaParameters (RIDER-118944)
Now we can use a custom main class from JUnitDevKitPatcher to run tests in dev-mode,
similarly to com.jetbrains.rider.test.devServer.RiderTestNGDevMainKt and then use com.intellij.rt.junit.JUnitStarter.


IJ-CR-149961


(cherry picked from commit a6255c22c1ec972cbfc35837af31503fe81ac2a9)

GitOrigin-RevId: 47d1329fca6e9061fd7f43626321813e3783b7e3
2024-11-22 16:14:33 +00:00
Andrei Iurko
efbebbef0b [qodana] QD-9891 Add reviewed inspections categories and fix json schema validation
GitOrigin-RevId: 7ca2b2fde31a47b41b1940badee13d931bd91102
2024-11-06 14:28:05 +00:00
Vladimir Dolzhenko
87e1ebdb33 [kotlin] Do not use kotlin test framework templates in K1
Create test intention uses j2k under the hood, that's why it has to use java templates

#KTIJ-9787

GitOrigin-RevId: c09bce66dad527e94a5ce19d415beb703bf96ab4
2024-10-13 06:30:07 +00:00
Andrei Iurko
4111cfc875 [qodana] QD-9891 Add aspects with the highest certainty for inspections
GitOrigin-RevId: 8fad66714287192bd5cbc8396a3d30f1ba139302
2024-10-11 14:49:57 +00:00
Sergei Vorobyov
386665b49e [Junit|Test] fix: use getMethod instead of getDeclaredMethod for accessing public comparison failure data
The getMethod finds public methods in class hierarchy
The getDeclaredMethod finds public and private methods in target class

Issues IDEA-359095, IDEA-353644

GitOrigin-RevId: 772c318f95c561e36018dfbd16cf2f7b62663e94
2024-10-11 12:39:51 +00:00
Bart van Helvert
51c1afc502 [jvm] Support @Extensions in JUnit malformed declaration inspection
#IDEA-360210 Fixed

GitOrigin-RevId: 90317c39c05c55757bcd2cae30e41d6b398c6926
2024-10-11 12:23:22 +00:00
Vladimir Parfinenko
25eacf2a26 [debugger] print async stack trace during exception stack trace printing in debug and test runs, IDEA-356859
Java is supported completely, Kotlin -- partially

GitOrigin-RevId: 345192cb18ea86cf39d97b5dd538bb44d29e41ab
2024-10-02 21:56:49 +00:00
Bart van Helvert
82309c793d [kotlin] Properly enable K2 in K2 JUnit tests
GitOrigin-RevId: 097e0ea0510258c0df5d3368354bf42ab9f047aa
2024-09-26 17:15:32 +00:00
Gregory.Shrago
f559bbec12 add knownIssue section for top issues
GitOrigin-RevId: cb8f2ac42f237cd8010959cb73f8aedadad3cfec
2024-09-24 02:16:42 +00:00
Viktors Jengovatovs
5767a7d4e5 Making junit plugin using default test runner in case Spock testing framework is detected in classpath.
Currently, when spock jar is in classpath, for example `spock-core-2.3-groovy-4.0.jar`, the IDE junit plugin detects PSI from the jar `org.junit.platform.engine.TestEngine` with value `org.spockframework.runtime.SpockEngine`. By that the IDE forces to use Junit5.

In case a project uses Spock with combination of Junit4 such detection logic makes junit4 test detection impossible when the tests are performed per package or project.

Withing the fix the IDE detects Spock and Junit4 tests simultaneously.

closes https://github.com/JetBrains/intellij-community/pull/2838

GitOrigin-RevId: 20d138df183f8dfdb3121986498b080d4a61a171
2024-08-29 14:24:47 +00:00
Bart van Helvert
d165bd12df [junit] Fix false positive when using parameter provider with parameter source
#IDEA-357358 Fixed

GitOrigin-RevId: 3250bc9fb3cd442749cec67b58abbb6b7b2227b1
2024-08-08 21:42:30 +00:00
Yuriy Artamonov
4dac328bf4 [i18n] IJPL-158521 Fix more ellipsis problems in plugins
GitOrigin-RevId: 981393c6f975e303847ca598b650fec8fe65d9bf
2024-07-30 16:35:51 +00:00
Vladimir Krivosheev
398ebce1d5 split content report
GitOrigin-RevId: ef449bdf4c5480a6ee3ce43b4af118c2c6e31219
2024-07-25 19:20:06 +00:00
Sergei Vorobyov
c9b6c8e3a5 IDEA-355257 [TestEvents] new: added unit tests for the ComparisonFailureData builder
GitOrigin-RevId: 9ab14b890646ecc255fe6b8437ad7ed7c7b427f4
2024-07-18 16:14:03 +00:00
Bart van Helvert
8134aff6ea [junit] Run Kotlin JUnit tests on both K1 and K2 frontend
#IDEA-354809 Fixed

GitOrigin-RevId: 762f49182607ab12adee58053a76606f8a923cfa
2024-07-17 22:28:16 +00:00
Bart van Helvert
a96d4a2c2b [kotlin] Add Kotlin JUnit tests to test group
GitOrigin-RevId: e3d884d88cf9919410a1dff48e92577d6249d269
2024-06-26 18:23:10 +00:00
Tagir Valeev
440654c48f Pattern variable can be used fixes; other warning fixes
GitOrigin-RevId: 49f37e7f5d748be50ee66fdf66a5c9b98b1b7432
2024-06-18 19:55:23 +00:00
Mikhail Pyltsin
2fdade319c [groovy-test] IDEA-353402 Inappropriate support test frameworks for groovy in dumb-mode
GitOrigin-RevId: 270a3cb538b2e2ed6b97f61c8302de7d12f59b21
2024-05-13 18:35:17 +00:00
Alexey Kudravtsev
02dcc5107b introduce utility method DumbService.isUsableInCurrentContext; replace usages
GitOrigin-RevId: 5ef82623debf3474bd9ed67829346f3d0f9967a3
2024-05-03 18:14:12 +00:00
Bart van Helvert
3a34e5871e [junit] Don't attribute value to not-null
#EA-1158050 Fixed

GitOrigin-RevId: 9a6c3e485ed800bec047bf6f5716dfc75b8bbbc8
2024-04-12 11:52:28 +00:00
Bart van Helvert
c856f5fe2c [junit] Migrate JUnit reference contributor tests to JVM test
#IDEA-349194 Fixed

GitOrigin-RevId: 70fe2fbaef0e37234d846171338974185f8031cc
2024-04-09 14:27:15 +00:00
Maksim Sasnouski
9e9e546fe0 [junit] IDEA-349194 Add tests for EnumSource go to
closes https://github.com/JetBrains/intellij-community/pull/2710

GitOrigin-RevId: 13034a60972e73fd3986bd68a954ab58100584be
2024-04-09 14:27:11 +00:00
Maksim Sasnouski
b5e084504a [junit] IDEA-349194 @EnumSource "names" should be resolved in Kotlin
closes https://github.com/JetBrains/intellij-community/pull/2710

GitOrigin-RevId: 9c228bb1c73abe8037f11e6289fcbc286ea3d23e
2024-04-09 14:27:06 +00:00
Maksim Sasnouski
f772e23a4b [junit] IDEA-349194 Refactoring: no functionality changed
closes https://github.com/JetBrains/intellij-community/pull/2710

GitOrigin-RevId: 9a46a283c7c283a6ee10b16b3ed01ba6642646fc
2024-04-09 14:27:01 +00:00
Mikhail Pyltsin
75f080da26 [java-tests] IDEA-348322 Java: Add the ability to launch tests in Dumb mode
Merge-request: IJ-MR-128894
Merged-by: Mikhail Pyltsin <Mikhail.Pyltsin@jetbrains.com>

GitOrigin-RevId: 68a6972f96f46855ecce100a84f85ef03d60e6e4
2024-03-29 16:31:09 +00:00
Tagir Valeev
5428775b85 [indexing] Remove progress indicator from PsiSearchHelper.isCheapEnoughToSearch and at use sites
Was unused

GitOrigin-RevId: 98f5e2b1f48f54fc15d54cbbf73ff549f96fca6a
2024-03-20 14:28:13 +00:00
Bart van Helvert
f896419d92 [jvm] Split JUnit usage provider per framework
Will allow for disabling them individually. #IDEA-346510 Fixed

GitOrigin-RevId: 7b879111b92f38a7a55166d67d657520c6d9314d
2024-03-12 01:13:37 +00:00
Bart van Helvert
570909e505 [junit] Remove redundant Function usage
GitOrigin-RevId: 723bbaf3568cb31117be06f9c8167d0f2c4f9e0e
2024-03-06 23:34:35 +00:00
Bart van Helvert
8b3d6afb4a [test] Don't parse expected/actuals for very long messages
The default threshold is 10_000 characters but can be changed by using setting the `idea.expected.message.length.threshold` property key. #IDEA-347460 Fixed

GitOrigin-RevId: 2c5ab995aab90eed2be001a2962bb8a42e984a7a
2024-02-29 11:31:09 +00:00
Alexey Kudravtsev
dfc5db43aa optimization: filter inspection by language more correct in tests
Provide correct EP for inspection tools even with inconsistent tool.getShortName() and shortName="" in plugin.xml.
That allows obtaining correct tool.getLanguage(), and avoid running irrelevant inspections.
E.g. CheckDtdRef inspection doesn't run in java-only tests anymore.

GitOrigin-RevId: 188e9d55686ca084611c5c89cb899874dd078010
2024-02-25 04:22:20 +01:00
Andrey Cherkasov
8600782909 Mass cleanup: make extension classes final
^IDEA-309065

GitOrigin-RevId: 3109a0fdab7a1ae647ad8a3d69ac332dbc3b49b9
2024-02-21 16:23:34 +00:00
Bart van Helvert
d6b40e6c72 [jvm] Fix exception when making inner class runnable
Don't generate action when nested class hierarchy is empty. #EA-1081624 Fixed

GitOrigin-RevId: 934b238d81d6c1696e226199a75e37c8ed2ae883
2024-02-16 14:51:50 +00:00
Bart van Helvert
7e78082cce [java] Properly search hierarchy for meta annotations
#IDEA-342351 Fixed

GitOrigin-RevId: 27da12039bf7a7c46da5803d45d1a6125344f233
2024-02-16 14:51:47 +00:00
Konstantin Aleev
da0308f481 [platform] IDEA-342326 provide factory method for char tail type
- ensure that TailType class is loaded before CharTailType class if factory method is used

GitOrigin-RevId: ccfe8d4ae66c9ff6bd9ab0bef9367c4357db1759
2024-01-08 10:52:30 +00:00
Georgii Ustinov
1cc08a1262 [JUnit] Change visibility modifiers only for JUnit4 methods during migration to JUnit5
^IDEA-336783 fixed

GitOrigin-RevId: f1bf89a28b5213ac76b7b53541719b726508195c
2024-01-05 15:46:00 +00:00
Bart van Helvert
eb550630a3 [junit] Make UAST reference providers anonymous
GitOrigin-RevId: 9e21f73dae126ea7684121b9c4b56588dec945df
2024-01-03 20:12:18 +00:00
Bart van Helvert
cf1a684651 [junit] Use UAST pattern API for JUnit reference contributors
Allows for re-using UAST caches. #IDEA-339562 Fixed

GitOrigin-RevId: 7fd8e333e675900a0ac22bdd6bba1d46f7a0800d
2024-01-02 17:00:19 +00:00
Bart van Helvert
75158a88bd [jvm] Make inspection test names more consistent
GitOrigin-RevId: 99cfc9c6317507107b6d011716e2bddb1726eddc
2024-01-02 17:00:12 +00:00
Bart van Helvert
cb66d06e9a [junit] Clean up inspection description examples
GitOrigin-RevId: c34f559ea084f7c4460b7b8cdec5bad2abfbf191
2023-12-29 15:08:17 +00:00
Bart van Helvert
db27932610 [junit] Remove empty file
GitOrigin-RevId: cf394107ae404c8301fc06d02d73ce03e780d899
2023-12-29 13:51:58 +00:00
Bart van Helvert
98238af2c8 [junit] Move JVM inspection descriptions to JUnit plugin
GitOrigin-RevId: 5b9ae09caa46458619063abf81e074033b97ee57
2023-12-29 13:51:51 +00:00
Bart van Helvert
271d362d14 [junit] Move Java JUnit inspections into JUnit plugin
#IDEA-341929 Fixed

GitOrigin-RevId: 7dd42203f64380382b3d39c77a409fe652b09941
2023-12-28 23:17:28 +00:00
Bart van Helvert
58298dd53c [jvm] Move JUnit inspections into JUnit plugin
#IDEA-334017 Fixed

GitOrigin-RevId: 919fb236aeb44c192944eae2bae8da621e5a0e74
2023-12-13 03:15:25 +00:00
Georgii Ustinov
de03349b70 "Method is never used" reported for JUnit 5 tests in abstract class #IDEA-300673 fixed
GitOrigin-RevId: 05b7e271ebb1aaf5075193e97c01bb7f55aa722f
2023-10-05 14:04:39 +00:00
Georgii Ustinov
5fb03270e9 IDEA-325434 'Private field is never assigned' inspection, review refactor
GitOrigin-RevId: c5c1f030c9612a0d18722a7c8f2de7cbb377e74b
2023-10-02 13:52:33 +00:00
Georgii Ustinov
ce66582284 [Java. Tests. JUnit] IDEA-325434 'Private field is never assigned' inspection, false-positive fix.
JUnit @TempDir meta-annotation - Do not suggest a warning only if JUnit version is higher than 5.10

GitOrigin-RevId: 17fe224615acf642525650829a3bb53b128aa9b6
2023-09-26 16:47:29 +00:00
Nikolay Chashnikov
f1eb8078f4 [junit] API cleanup: remove deprecated unused constructors (IDEA-322162)
GitOrigin-RevId: 37c8e97f437c4015f7a7961793bbee65e576f37f
2023-09-22 18:51:01 +00:00
Bart van Helvert
0091e74abb [jvm] Fix test case without tests inspection in case test framework is not available
GitOrigin-RevId: c1fda93f8f7907f1f352a6560c7f69d69d750bf9
2023-09-15 16:07:49 +00:00
Vladimir Dolzhenko
9af98f3797 [kotlin] JavaTestFramework covers ANY (jvm-like) languages
#IDEA-176333
#KTIJ-24820

GitOrigin-RevId: a5d3ae910b001829e09cb097a3e430cc8ed3bdbf
2023-07-25 09:36:57 +00:00