Hi guys, is it possible to run UI tests from Fleet...
# multiplatform
a
Hi guys, is it possible to run UI tests from Fleet? I followed a few tutorials and docs but I always end up with this error:
Cannot invoke "String.toLowerCase(java.util.Locale)" because "android.os.Build.FINGERPRINT" is null
java.lang.NullPointerException: Cannot invoke "String.toLowerCase(java.util.Locale)" because "android.os.Build.FINGERPRINT" is null
c
AFAIK, Common UI testing can only test Compose UI not full intergration tests. https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-test.html If you want to test a UI flow navigating around interacting on a "device" then you still need to write tests in androidIntergrationTest src set.
It is also experimental so YMMV, and probably issues, create tickets on YouTrack the team is pretty responsive.
a
Maybe I'm wrong but I'm testing just a Composable like the example, this should be fine, right?
Copy code
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.runComposeUiTest
import kotlin.test.Test
import androidx.compose.material.Text

class AppShould {
    @OptIn(ExperimentalTestApi::class)
    @Test
    fun `should show a test`() = runComposeUiTest {
        setContent {
            Text("1234")
        }
    }
}
This breaks with the error
c
Honestly without seeing the entire project setup, couldn't tell you....
j
f
is there a way to disable uiTests for android target and just use jvm?