-
-
Notifications
You must be signed in to change notification settings - Fork 783
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
Setup Gradle functional tests #4074
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4074 +/- ##
===========================================
+ Coverage 0 84.27% +84.27%
- Complexity 0 3249 +3249
===========================================
Files 0 471 +471
Lines 0 10261 +10261
Branches 0 1805 +1805
===========================================
+ Hits 0 8647 +8647
- Misses 0 664 +664
- Partials 0 950 +950
Continue to review full report at Codecov.
|
IntelliJ IDE does not really like addition test source set like I am thinking if we should start experimenting with extracting integration tests into a separate module as discussed in #3324 (comment). |
I'm not seeing that - which IDE specifically (IntelliJ, Android Studio) & which version? Can you try deleting the I have no red underline in any files under /src/intTest (IntelliJ IDEA 2021.2.1) with almost all settings at defaults: |
I think as long as the Spek IDE plugin can pick up the tests, Gradle executes them and IDE indexing works, the fact that it's not specifically identified as green/test module isn't a showstopper (it does bug me as well though! But this setup is simpler to me than having a whole new module for integration tests) We can have others weigh in of course. |
Agree. Also I believe you can workaround the coloring issue with something like:
Sadly I wasn't able to let it work (see https://youtrack.jetbrains.com/issue/IDEA-151925). If you folks look into it let me know 🙏 |
Converting back to draft and removing from 1.19.0 milestone (for now) - Gradle 7.3 is introducing support for test suites which I believe supersedes the currently recommended configuration I've used here. It would be better to wait to see what that looks like and use the newer, hopefully simpler setup. |
@3flex Would you mind sharing some of the pointers how Gradle 7.3 changes the test suites? (Assuming this is for Gradle integration test only) |
b11b720
to
1409591
Compare
https://docs.gradle.org/7.3-rc-1/release-notes.html#test-suites |
7a235e6
to
b79c62d
Compare
Great stuff! What's the status on the IDE support? |
146b506
to
4350fc2
Compare
Unfortunately it's not configured automatically but I've requested this integration & configuration be applied automatically: gradle/gradle#18723 |
This should autoconfigure IntelliJ module test roots for each test suite from Gradle 7.4
This is a step on the way to separating Gradle TestKit tests from the other Gradle plugin tests (see #3778).
This PR sets up the Gradle build to support the new structure, and moves tests that use TestKit but don't use dry-run mode into
src/functionalTest
. It also moves shared code intosrc/testFixtures
so they can be used by both functional tests and standard tests while that's still necessary.There's a new task
functionalTest
which runs all tests insrc/functionalTest
. BothfunctionalTest
andtest
are dependencies ofcheck
task and therefore also thebuild
task.