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:
If i try to run just the AndroidTest it gives me this error:
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
Xcode 14 seems to have removed multiple simulators from the system.
You can create a new simulator using the command below:
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