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)
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: