-
Notifications
You must be signed in to change notification settings - Fork 410
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
Integration tests refactoring #2925
Comments
Improving the integration tests is also connected to improving Dokka's Gradle build files #2703, since the integration tests break project isolation to publish Dokka to Maven Local dokka/build-logic/src/main/kotlin/org/jetbrains/taskUtils.kt Lines 6 to 14 in 1acfb60
I'm working on a Gradle Plugin for solving this problem, (though it's still awaiting approval in the Plugin Portal). I actually manually tested it using Dokka! It required a significant amount of changes though, so I'll make a PR as a demonstration, but I wanted to break it up into smaller pieces. |
There was a discussion on Gradle Slack this week and https://github.com/gradle/exemplar was recommended for running integration tests. Although I find it pretty tough to understand how to use it, I think it would be worth investigating. |
Grooming notes IntroductionWe have some integration tests already, but they've proven to be somewhat difficult to maintain, to extend, and they have some problems in their core that are getting in the way of other related things. These tests were a good start, but since their inception we've figured out additional use cases, figured out what works and what doesn't, and what's useful or would be nice to have in general. The hypothesis is that it'll be much easier and faster to start completely from scratch and re-implement integration (e2e) tests based on the specific desires / requirements and our experience, than to try to salvage the existing tests. Moreover, starting from scratch should also be safer, as it'll allow us to have a seamless transition from the old tests to the new, without worrying that the old (primary) tests accidentally break after refactoring. Types of testsThere are two types of integration / end-to-end tests:
They could have the same setup (like now), but because they are useful in different ways - it might be easier to separate them, where each type has its own requirements. Artificial project tests
Examples of issues it helps find:
Notes:
Arbitrary user projects
Examples of issues it helps find:
Notes:
Pain pointsSome pain points of the existing tests:
General notes / requirementsThings to keep in mind while designing the solution:
Nice to have
|
First iterationIt makes sense to start with something smaller and approachable, and then build on top of it. The first iteration can focus on:
|
Dokka's integration tests run Dokka on real projects using various versions of Gradle, Kotlin and Android, and make sure there are no abnormalities, all links are present, everything is resolved and is able to be built, etc. This is extremely useful, and the same behaviour should be preserved.
Additionally, the integration tests are used for generating and publishing live demos of documentation to S3, which is very useful for reviewing UI/UX changes. This feature should be preserved as well.
However, the way that the tests are set up now is not optimal, and it's causing problems in various places:
kotlinx.coroutines
, are imported as git submodules. This is just annoying to maintain and update, and not obvious to someone encountering it for the first time. Maybe these projects could be added as dependencies, more information hereThe outlined problems should be researched and addressed if possible.
The text was updated successfully, but these errors were encountered: