Skip to content
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

[TS-38628] [Impacted Test Engine] Kotlin Migration #618

Merged
merged 31 commits into from
Jan 21, 2025

Conversation

Avanatiker
Copy link
Member

@Avanatiker Avanatiker commented Dec 13, 2024

Migration of the Impacted Test Engine. Follow up of #617

Summary

This Pull Request implements several changes across the project. The most notable updates include the migration to Kotlin conventions in various Gradle files, Java toolchain updates, dependency updates, and the introduction of new classes and test cases for an impacted test execution engine.

  • Build System Updates:

    • Updated Java versions across Gradle files to align with recent conventions (Java 21 for some modules, Java 17 in others).
    • Adoption of kotlin-convention plugin in multiple Gradle scripts to unify project conventions.
    • Gradle dependency updates for libraries such as Mockito, Logback, and OkHttp.
    • Adjustments in settings.gradle.kts to remove unnecessary toolchains plugin and simplify includes.
    • Minor cleanup in .gitignore.
  • Code Changes:

    • Enhanced impacted test execution engine, introducing new functionality for ordering and filtering impacted tests.
    • Added new classes for impacted tests: ImpactedTestEngine, ImpactedTestsSorter, InternalImpactedTestEngine, etc.
    • Refactored or migrated existing old implementation while making it Kotlin-friendly for better consistency.
  • Test Cases:

    • Comprehensive new tests for intricate scenarios within impacted test execution workflows.
    • Enhanced support for dynamic or prioritized tests using mock-based unit cases.

@Avanatiker Avanatiker force-pushed the ts/38628_kotlin_migration_impacted_test_engine branch from f636e9f to 680a08a Compare December 13, 2024 03:57
@Avanatiker Avanatiker force-pushed the ts/38628_kotlin_migration_impacted_test_engine branch from 680a08a to 12d4308 Compare December 13, 2024 03:58
@Avanatiker
Copy link
Member Author

I have solved all true positives. Rest is false positive

@Avanatiker Avanatiker marked this pull request as ready for review January 19, 2025 20:29
@Avanatiker Avanatiker requested a review from DreierF January 19, 2025 20:29
@Avanatiker
Copy link
Member Author

I have changed some docker code to comply to the best practices. I not sure if i tested it correctly. Is it possible to add docker tests?

@Avanatiker
Copy link
Member Author

What do we do about the bazillion test gaps?

@cqse-teamscale-io
Copy link

  • agent/src/main/java/com/teamscale/jacoco/agent/JaCoCoPreMain.java:63-77: [Test Gap] Changed method createRuntime has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/commons/IndentingWriter.kt:9-13: [Test Gap] Added method indent has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/commons/IndentingWriter.kt:16-20: [Test Gap] Added method writeLine has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/commons/IndentingWriter.kt:22-22: [Test Gap] Added method toString has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngine.kt:40-40: [Test Gap] Added method getArtifactId has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngine.kt:14-27: [Test Gap] Added method discover has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngine.kt:29-36: [Test Gap] Added method execute has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngine.kt:38-38: [Test Gap] Added method getGroupId has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/TestDataWriter.kt:15-22: [Test Gap] Added method dumpTestExecutions has not been tested. (view in Teamscale)
  • impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/TestDataWriter.kt:25-32: [Test Gap] Added method dumpTestDetails has not been tested. (view in Teamscale)

See other 7 changed and 41 added untested methods.

@DreierF
Copy link
Contributor

DreierF commented Jan 21, 2025

I have changed some docker code to comply to the best practices. I not sure if i tested it correctly. Is it possible to add docker tests?

I also did a manual test and seems to work as expected.

What do we do about the bazillion test gaps?
We need to ignore those as we cover them, but don't collect coverage for them at the moment, because it is very difficult to instrument due to the multiple nested JVM being involved in the process.

@DreierF DreierF merged commit 93045de into master Jan 21, 2025
6 of 7 checks passed
@DreierF DreierF deleted the ts/38628_kotlin_migration_impacted_test_engine branch January 21, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants