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

Instrumented tests for iOS #1786

Open
wants to merge 14 commits into
base: jb-main
Choose a base branch
from

Conversation

ASalavei
Copy link

@ASalavei ASalavei commented Jan 20, 2025

Bring and launch instrumented tests from the compose-multiplatform. Some tests where ignored to be fixed later.
Tests structure:

  • :compose:ui:ui-xctest project contains logic of converting Kotlin tests to XCTests, also implement touches simulation (CMPTestUtils).
  • compose/ui/ui/src/uikitInstrumentedTest contains Kotlin tests that are wrapped into the native iOS framework with XCTests API.
  • compose/ui/ui/src/uikitInstrumentedTest/launcher contains xcode project that launches XCTests inside UIApplication environment on iOS Simulator (tests are running with xcodebuild command).

CI change: https://jetbrains.team/p/ui/reviews/23/files

Fixes: https://youtrack.jetbrains.com/issue/CMP-7394/Move-iOS-Instrumented-tests-into-compose-multiplatform-core-after-switching-to-Kotlin-2.1.0

Release Notes

N/A

@ASalavei ASalavei changed the title [WIP] Instrumented tests for iOS Instrumented tests for iOS Apr 1, 2025
@ASalavei ASalavei marked this pull request as ready for review April 1, 2025 20:36
@igordmn
Copy link
Collaborator

igordmn commented Apr 2, 2025

Added "CI change: https://jetbrains.team/p/ui/reviews/23/files" to the description

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it a part of compose/ui?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now the module provides functionality to convert Kotlin tests to the XCTests and support for native UI touches simulation. Both are used by instrumented tests only. It looks like it's the best location for now. Anyway, any proposals are welcomed!
If it will be necessary in the future, we can split this module in 2, but currently I don't see good reasons for this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about /testutils/*?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Moved.
Anyway, for now I don't want to split the module into two.

@ASalavei ASalavei requested a review from MatkovIvan April 9, 2025 07:24
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.

3 participants