Skip to content

iOS unit tests failing with 70% failure rate (387 out of 550 tests) #116

@rafael-quixabeira

Description

@rafael-quixabeira

The iOS unit tests in the kotlin-multiplatform module have a high failure rate of approximately 70%, while Android tests pass completely.

Current Behavior

  • Android tests: ✅ All 551 tests pass (100%)
  • iOS tests: ❌ 387 out of 550 tests fail (70.4% failure rate)
    • 163 tests pass (29.6%)

Failure Types

The iOS test failures fall into three main categories:

  1. FileReadException: Tests fail when trying to read JSON resource files from src/commonTest/resources/
    - Example: com.goncalossilva.resources.FileReadException in various capture tests
  2. NotConnectedException: Mock connection setup issues
    - Example: com.ricoh360.thetaclient.ThetaRepository.NotConnectedException
  3. AssertionError: Test assertion failures
    - Example: kotlin.AssertionError in various option tests

Steps to Reproduce

  1. Clone the repository
  2. Navigate to kotlin-multiplatform/
  3. Run iOS unit tests:
    ./gradlew :kotlin-multiplatform:iosSimulatorArm64Test
  4. Check the test report at: build/reports/tests/iosSimulatorArm64Test/index.html

Expected Behavior

iOS tests should have a similar pass rate to Android tests (ideally 100% or close to it).

Environment

  • Kotlin: 1.9.20
  • Gradle: 8.5
  • Platform: macOS (Apple Silicon)
  • Target: iosSimulatorArm64
  • Xcode: 16.0

Test Report Summary

550 tests completed, 387 failed

Failed test examples:

  • com.ricoh360.thetaclient.capture.BurstCaptureTest.startCaptureTest
  • com.ricoh360.thetaclient.capture.PhotoCaptureTest.takePictureTest
  • com.ricoh360.thetaclient.repository.options.ApertureTest.setOptionApertureTest
    (and many more...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions