# Tests failing for \`Writing tests for Platform\` section

**URL:** <https://forums.kodeco.com/t/tests-failing-for-writing-tests-for-platform-section/183221>\
**Category:** Kotlin Multiplatform by Tutorials\
**Created:** [January 27, 2023, 12:31pm UTC](https://forums.kodeco.com/t/tests-failing-for-writing-tests-for-platform-section/183221 "2023-01-27T12:31:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![talhamir](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/talhamir/32/105896_2.png) [@talhamir](https://forums.kodeco.com/u/talhamir)\
**Post date:** [January 27, 2023, 12:31pm UTC](https://forums.kodeco.com/t/tests-failing-for-writing-tests-for-platform-section/183221/1 "2023-01-27T12:31:54Z")

</div>

The tests from chapter 8, section `Writing tests for Platform`, are failing for me. When I run all the tests using the command `./gradlew :shared:allTests`, it gives me this error:

```auto
> Task :shared:iosSimulatorArm64Test
Invalid device: iPhone 12
java.lang.IllegalStateException: command '/usr/bin/xcrun' exited with errors (exit code: 148)

```

If i try to run just the AndroidTest it gives me this error:

```auto
SUPPORTED_ABIS must not be null
java.lang.NullPointerException: SUPPORTED_ABIS must not be null
	at com.raywenderlich.organize.Platform.<init>(Platform.kt:47)

```

For some reason, the actual `PlatformTest` class in androidTest also shows this error: `Actual class 'PlatformTest' has no corresponding expected declaration`

---

<div class="post-metadata">

**Author:** ![subhrajyotisen](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/subhrajyotisen/32/109261_2.png) [@subhrajyotisen](https://forums.kodeco.com/u/subhrajyotisen)\
**Post date:** [February 2, 2023, 8:10pm UTC](https://forums.kodeco.com/t/tests-failing-for-writing-tests-for-platform-section/183221/2 "2023-02-02T20:10:13Z")

</div>

> [@talhamir](#):
>
> `java.lang.IllegalStateException: command '/usr/bin/xcrun' exited with errors (exit code: 148)`

Xcode 14 seems to have removed multiple simulators from the system.  
You can create a new simulator using the command below:

```auto
xcrun simctl create "iPhone 12" "iPhone 14"

```

Post running the command, `./gradlew :shared:allTests` should run fine.

As for `androidTest` not running, it seems to be a conflict between KMM and the Android Gradle plugin. androidTest is a name reserved by the Android Gradle Plugin and but the format {module}Test is needed by KMM. There doesn’t seem to be a solution at the moment  
You can follow the discussion at [Google Issue Tracker](https://issuetracker.google.com/issues/191287536?pli=1)

---

<div class="post-metadata">

**Author:** ![kpere](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kpere/32/109586_2.png) [@kpere](https://forums.kodeco.com/u/kpere)\
**Post date:** [June 25, 2023, 11:40pm UTC](https://forums.kodeco.com/t/tests-failing-for-writing-tests-for-platform-section/183221/3 "2023-06-25T23:40:44Z")

</div>

Hi @talhamir

Just wanted to do a follow up. We hope that the response provided by @subhrajyotisen was helpful in addressing your concerns.

If you have any further questions or need additional assistance, please don’t hesitate to ask. Our community is here to support you!

---

<div class="post-metadata">

**Author:** ![kpere](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kpere/32/109586_2.png) [@kpere](https://forums.kodeco.com/u/kpere)\
**Post date:** [June 26, 2023, 10:25am UTC](https://forums.kodeco.com/t/tests-failing-for-writing-tests-for-platform-section/183221/4 "2023-06-26T10:25:01Z")

</div>

Closed on June 26, 2023, 10:25am UTC


