Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/skills
1 change: 1 addition & 0 deletions .codex/skills
1 change: 1 addition & 0 deletions .junie/skills
39 changes: 39 additions & 0 deletions ai-skills/ios-instrumented-tests-compose/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: ios-instrumented-tests
Copy link
Collaborator

@igordmn igordmn Mar 11, 2026

Choose a reason for hiding this comment

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

This duplicates and extends the "Run iOS instrumented tests" in MULTIPLATFORM.md, and seems useful for humans too?

Can we just move all this there, and point agents to the readme?

Copy link
Author

Choose a reason for hiding this comment

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

Do you mean, to use MULTIPLATFORM.md instead of skills - not sure it's a good idea. At least it goes against the documentation. Skills have very specific format and dedication. If you want the agent to do tasks efficiently, you should follow this guidelines.
Obviously, we can tell the LLM to read MULTIPLATFORM.md before doing any job, but it won't be the same.
I would say, vice versa it does not work either because skills will have things like This skill should be used when the user asks about "running iOS tests", "iOS instrumented tests", "how to run ios tests", "launch specific ios test" and these tests are located in the "compose/ui/ui/src/uikitInstrumentedTest" directory. which does not look good for human-readable manual

Copy link
Collaborator

Choose a reason for hiding this comment

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

What I am worried about:

  • we described useful information for humans that we didn't describe in MULTIPLATFORM.md:
    • that I need to change "compose/ui/ui/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/Configuration.kt" to run specific tests
    • we mentioned simulator id, do we need to specify it? we didn't mention it in MULTIPLATFORM.md
    • the purpose of testutils-xctest
    • where the uikitInstrumentedTest environment is located (compose/ui/ui/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/test)
  • we duplicated information and we have to keep 2 places up-to-date

Maybe we can solve it this way:

  • move all human-useful info to MULTIPLATFORM.md, testutils-xctest/README.md, ui/ui/src/uikitInstrumentedTest/README.md
  • keep robot-specific info here and reference human-related-docs
  • remove some info that isn't useful for humans and robots can easily know this.
  • avoid specific names/paths to not miss them during refactorings ("the setup function" instead of "setupXCTestSuite", "the xc test configuration Kotlin file" instead of the specific file)

Though, if you think it could degrade performance of the agent, we can accept the new duty of keeping this up-to-date.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you have doubts, another opinion, or it is more difficult to implement, I am fine just with the current skill

description: This skill should be used when the user asks about "running iOS tests", "iOS instrumented tests", "how to run ios tests", "launch specific ios test" and these tests are located in the "compose/ui/ui/src/uikitInstrumentedTest" directory.
version: 1.0.0
---

iOS Instrumented tests are designed to run XCTests written on Kotlin using the iOS Simulator as an environment.

# iOS Instrumented Tests — Compose Multiplatform Core

Perform steps exactly in the following order:

## Configure which tests should be started
In the file compose/ui/ui/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/Configuration.kt write all tests that must be launched. Add corresponding imports in the header. Save the file. If it's needed to run all instrumented, pass nothing to the setupXCTestSuite.
Follow the examples in commented code in the file. Note: configuration can launch either entire test classes or multiple test cases from a single test class only.

## Running All iOS Tests

1. Get a list of all devices and select the most appropriate one. Prefer the latest iPhone with the latest iOS if nothing else said. Select and remember corresponding simulator id for the next step.
```
xcrun xctrace list devices
```

2. Navigate to the launcher repository root:

```bash
cd compose/ui/ui/src/uikitInstrumentedTest/launcher
```

3. Build and run tests
```
xcodebuild test -scheme Launcher -project Launcher.xcodeproj -destination 'platform=iOS Simulator,id=<Simulator ID>'
```

# Key Test Source Locations
(from the repository root)
`compose/ui/ui/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/Configuration.kt` - location of the configuration file which determines which tests to run.
`compose/ui/ui/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/test` - Test environment and utilities to configure tests
`testutils/testutils-xctest/` - Contains a Kotlin wrapper that allows converting Kotlin tests to XCTests as well as an Objective-C project that provides API for low-level touches and other input gesture simulation.
Loading