Start native apps faster with the Composables CLI ->
Class

FailureArtifact

Represents a diagnostic artifact produced by the test failure pipeline when a Compose UI test fails.

failureArtifactStorageUsageSample

@Sampled
fun failureArtifactStorageUsageSample(artifact: FailureArtifact) {
    val storage = PlatformTestStorageRegistry.getInstance()

    // Retrieve a Uri to share, delete, or process the file
    val uri = storage.getOutputFileUri(artifact.fileName)

    // Or open an input stream to read the generated file directly
    val inputStream = storage.openInputFile(artifact.fileName)
}