-
-
Notifications
You must be signed in to change notification settings - Fork 777
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 DetektJvmSpec to use ProjectBuilder #4075
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4075 +/- ##
============================================
+ Coverage 83.45% 83.51% +0.06%
- Complexity 3185 3186 +1
============================================
Files 463 461 -2
Lines 9095 9095
Branches 1768 1768
============================================
+ Hits 7590 7596 +6
+ Misses 571 570 -1
+ Partials 934 929 -5
Continue to review full report at Codecov.
|
Pre-merge check currently fails. Is it fair to assume that the improvement comes from changing from |
It's from using TestKit runs a full Gradle build and spins up its own daemon. ProjectBuilder is much more limited, and can't be used for functional tests, because you can't execute tasks. But for checking things like whether task input & output values are set correctly it's suitable, and faster. |
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.
Great work 👍
Just one side note: now we're moving from actually running Gradle tasks to just setting up a project and asserting that the tasks are configured properly.
Not a big deal but if the task blows up during execution, the former task would have found it. This one not. Something to keep in mind 👍
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt
Outdated
Show resolved
Hide resolved
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt
Outdated
Show resolved
Hide resolved
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt
Outdated
Show resolved
Hide resolved
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt
Outdated
Show resolved
Hide resolved
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektJvmSpec.kt
Outdated
Show resolved
Hide resolved
fe168ef
to
18624c2
Compare
18624c2
to
4e939c1
Compare
2525cd2
to
30a68ad
Compare
See #3778. This reduced execution of the DetektJvmSpec test by about 25% on my machine.