You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to run Gradle integration tests with the K2 analysis enabled.
Notes
Under the hood, it should use the switch that was introduced in Add the ability to switch between K1 and K2 analysis for testing #3113 (i.e it should run Gradle test projects with that flag). This is to avoid situations where the automated tests pass, but manual testing fails - it should represent real-world scenarios.
The task integrationTest run without any additional parameters or configuration should NOT run tests with the K2 analysis, it should use the stable K1 analysis only. K2 is still experimental and not everything is expected to work reliably, so its testing should be separate from the tests that are expected to be stable. Especially given that K1 integration tests are often flaky and take a lot of time (1h+) as it is.
Not all integration tests are expected to pass with K2 enabled, so the tests should be configurable / selectable without having to configure or ignore it in code. In other words, tests should be selectable via an input parameter.
It should be possible to run these tests from the command line and via TeamCity.
Proposal
JUnit's ability to run selected tests via command line could be utilized:
I've prepared a separate TeamCity build configuration (Dokka Integration Tests [K2]) for testing and for future use, it has the same settings as the main tests, but the run trigger is disabled, so you'll have to trigger it manually. Once this issue is fixed, the trigger could be enabled, otherwise we'll see build failures or waste agent time.
The list of tests to be run with K2 could for now be hardcoded inside Build step: Gradle. It might also be possible to turn each test into a checkbox, and run tests based on enabled checkboxes (this might be convenient for testing new versions or fixes). The checkboxes are not expected to be done as part of this issue as it might take some considerable time to implement.
The text was updated successfully, but these errors were encountered:
It should be possible to run Gradle integration tests with the K2 analysis enabled.
Notes
integrationTest
run without any additional parameters or configuration should NOT run tests with the K2 analysis, it should use the stable K1 analysis only. K2 is still experimental and not everything is expected to work reliably, so its testing should be separate from the tests that are expected to be stable. Especially given that K1 integration tests are often flaky and take a lot of time (1h+) as it is.Proposal
JUnit's ability to run selected tests via command line could be utilized:
Could also check if
org.jetbrains.dokka.experimental.tryK2
was set totrue
when theintegrationTest
task was run, and pass it into the TestKit runner:dokka/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt
Lines 37 to 45 in 8e5c63d
So that the tests with K2 could be run as simple as:
TeamCity
I've prepared a separate TeamCity build configuration (Dokka Integration Tests [K2]) for testing and for future use, it has the same settings as the main tests, but the run trigger is disabled, so you'll have to trigger it manually. Once this issue is fixed, the trigger could be enabled, otherwise we'll see build failures or waste agent time.
The list of tests to be run with K2 could for now be hardcoded inside
Build step: Gradle
. It might also be possible to turn each test into a checkbox, and run tests based on enabled checkboxes (this might be convenient for testing new versions or fixes). The checkboxes are not expected to be done as part of this issue as it might take some considerable time to implement.The text was updated successfully, but these errors were encountered: