Skip to content

Releases: takahirom/roborazzi

1.44.0-alpha04

11 May 04:47
401a373

Choose a tag to compare

Example update for Compose Multiplatform

The Roborazzi sample for the Compose Multiplatform @Preview annotation has been updated to use CommonComposablePreviewScanner. Thanks to @sergio-sastre for this contribution!

Central Portal Migration

This migration to the Central Portal should not affect users. We've made this change because the previous publishing service (Sonatype OSSRH) is being sunset.

What's Changed

  • [NO library dependency change]Replace JvmAnnotationScanner with CommonComposablePreviewScanner + add example with @PreviewParameters by @sergio-sastre in #678
  • [NO library dependency change]Update AGP 8.7.3 by @takahirom in #679
  • Configure Gradle to publish to Central Portal by @takahirom in #683

Full Changelog: 1.44.0-alpha03...1.44.0-alpha04

1.44.0-alpha03

24 Apr 12:45
70abf03

Choose a tag to compare

Bugfixes and breaking changes for AI powered Assertion.

OpenAiAiAssertionModel's JsonSchemaType is renamed to ApiType. I realized we needed to adjust other areas beyond JsonSchema, so I renamed it.

Ollama Support

We’ve tried using local LLMs like Gemma in GitHub Actions. It’s not stable yet. If you have GPU servers, using it in a CI server seems feasible. I suggest checking the MMMU benchmark score, and a score of 65 or higher would be desirable.

You can use it like this.

          aiAssertionOptions = AiAssertionOptions(
            assertionImageType = AiAssertionOptions.AssertionImageType.Actual(),
            aiAssertionModel = OpenAiAiAssertionModel(
//              loggingEnabled = true,
              baseUrl = "http://localhost:11434/v1/",
              apiKey = "",
              apiType = OpenAiAiAssertionModel.ApiType.Ollama,
              modelName = "gemma3:4b-it-qat",
              seed = null,
            ),
          )

Bugfix for reasoning models

When using Azure OpenAI API's reasoning models, I encountered errors when passing temperature and max_tokens. I resolved this by making these parameters nullable to avoid passing them when not needed.

What's Changed

  • Update actions/download-artifact digest to 95815c3 by @renovate in #670
  • Update actions/upload-artifact digest to ea165f8 by @renovate in #672
  • Introduce Ollama support for roborazzi-ai-openai by @takahirom in #674
  • Make temperature and maxTokens nullable because they are not used in thinking models. by @takahirom in #676

Full Changelog: 1.44.0-alpha02...1.44.0-alpha03

1.44.0-alpha02

05 Apr 09:31
34ad558

Choose a tag to compare

Small fixes

  • We had a top-level function named debugLog(), but since it is not intended for public use, we have deprecated it and renamed it to roborazziDebugLog().
  • We used to call RuntimeEnvironment.setQualifiers() multiple times within a single test in Compose Preview Support. However, since this can negatively impact performance, we have consolidated the calls into a single invocation. This change may result in different images. If you notice any differences and they are problematic, please let us know.
  • Gemini's JSON Schema validation appears to have become stricter recently, so we made some adjustments to the JSON schema used for Gemini.

What's Changed

  • Rename debugLog to roborazziDebugLog() and update usages across the codebase by @takahirom in #668
  • [CI] Update JetBrains/writerside-github-action digest to 4d78a74 by @renovate in #660
  • Fix Gemini OpenAI compatibility API by @takahirom in #671
  • Improve compose config performance for Compose Preview Support by @takahirom in #667

Full Changelog: 1.44.0-alpha01...1.44.0-alpha02

1.44.0-alpha01

22 Mar 08:24
76812e8

Choose a tag to compare

Why is this an alpha release?

We don't usually release an alpha version. This release serves as a base implementation for future versions, allowing us to test whether this approach works well across various projects. If you are using Experimental Compose Preview Support, please try it out and provide feedback to help us improve it.

Introducing RoboComposePreviewOptions for Experimental Compose Preview Support

We have received a great deal of feedback regarding Experimental Compose Preview Support—particularly concerning animated composables such as the CircularProgressIndicator, which animates endlessly and causes test timeout errors. Previously, developers had to comment out code or implement complex workarounds. In this release, we introduce RoboComposePreviewOptions to address these issues, although it involves some breaking changes. To use RoboComposePreviewOptions, you need to add the new roborazzi-annotations dependency. If you do not use Experimental Compose Preview Support, please refer to Experimental Compose Preview Support.

Thanks to @sergio-sastre for contributing to the base implementation. These changes also pave the way for future customizations in Roborazzi.

@RoboComposePreviewOptions(
  manualClockOptions = [
    ManualClockOptions(
      advanceTimeMillis = 0L,
    ),
    ManualClockOptions(
      advanceTimeMillis = 516L,  // 500 ms + 16ms frame
    ),
    ManualClockOptions(
      advanceTimeMillis = 1032L,
    ),
  ]
)
@Preview
@Composable
fun PreviewDelayed() {
    ...
}

clipboard-image-1742618350

Breaking changes for Experimental Compose Preview Support's ComposePreviewTester users

Key interface changes

  1. ComposePreviewTester now handles TestParameter instead of raw ComposablePreview.
  2. A new @RoboComposePreviewOptions annotation enables time-based captures.
  3. The roborazzi-annotations module has been added as a new dependency.

Migration

Update custom testers:

// Before
class CustomTester : ComposePreviewTester<AndroidPreviewInfo> {
  override fun previews(): ComposablePreview<AndroidPreviewInfo> = AndroidComposablePreviewScanner().scanPackageTrees(...)
  override fun test(preview: ComposablePreview<AndroidPreviewInfo>)
}

// After
class CustomTester : ComposePreviewTester<AndroidPreviewJUnit4TestParameter> {
  override fun testParameters(): AndroidPreviewJUnit4TestParameter = AndroidComposablePreviewScanner().scanPackageTrees(...)
  override fun test(preview: AndroidPreviewJUnit4TestParameter)
}

Sample implementations

What's Changed

  • Support RoboComposePreviewOptions to support manual clock by @sergio-sastre in #633
  • Downgrade Java target version to 11 and add javadoc generation to CI workflow by @takahirom in #666

Full Changelog: 1.43.1...1.44.0-alpha01

1.43.1

20 Mar 02:20
785ea45

Choose a tag to compare

We added error handling for font availability checks in 1.43.0. However, it seems that the "font not available" error is an Error rather than an Exception, so we updated the code to handle Throwable.

What's Changed

  • [No Roborazzi library dependency update] Update dependency androidx.compose.ui:ui-tooling-preview to v1.7.8 by @renovate in #643
  • Handle font availability errors by catching Throwable by @takahirom in #665

Full Changelog: 1.43.0...1.43.1

1.43.0

27 Feb 01:02
9bedf3a

Choose a tag to compare

Bugfix

Added error handling for font availability checks in headless environments, falling back to Font.MONOSPACED when preferred fonts are unavailable. Thanks for reporting this issue @pavel163

What's Changed

  • [No Roborazzi library dependency update]Update dependency androidx.compose.foundation:foundation to v1.7.8 by @renovate in #620
  • Fix font crash by @takahirom in #661

Full Changelog: 1.42.0...1.43.0

1.42.0

16 Feb 04:46
4b9f3cd

Choose a tag to compare

Bug fixes

We are using the "Courier New" font for comparison image text and screenshot dumps. It appears that "Courier New" is not available in CentOS, although this may not be an issue for Mac, Ubuntu, and Windows users.

To address this problem, we have introduced two mechanisms. Thank you for reporting this issue, @LloydBlv.

  • Added a fallback to Font.MONOSPACED to ensure execution when the font exists
  • Made the font customizable through roborazzi.theme.typography.font.name=Your Font Name

What's Changed

  • Fix issue where Roborazzi crash when the font is not available by @takahirom in #657

Full Changelog: 1.41.1...1.42.0

1.41.1

12 Feb 10:47
4a1c149

Choose a tag to compare

In some cases, the new test result format breaks the report's HTML/JS. Thank for fixing this, @unni-dm!

What's Changed

  • Fix for HTML result will break when context data key has special char… by @unni-dm in #654

New Contributors

Full Changelog: 1.41.0...1.41.1

1.41.0

11 Feb 03:28
777f8c7

Choose a tag to compare

HTML Report Improvements

Thanks to @mannodermaus's contribution, context and AI assertion results now display more intuitively instead of showing raw data class toString() outputs.
image

Bug Fixes

  • Screenshot dumping now follows deterministic behavior thanks to @siarhei-luskanau's implementation

Automatic Retry Handling for 429 Errors

(Only relevant for arbigent-ai-openai users)
We've implemented automatic retry logic for HTTP 429 errors common with AI model rate limits, eliminating manual intervention.

Experimental Multi-Image AI Assertion

Originally developed for Arbigent, this feature now supports multi-image inputs for AI assertions - enabling detection of video playback or animated content through AI analysis.

What's Changed

  • Print collection content in ComposePrintToString to stabilize output in Dump screenshots. by @siarhei-luskanau in #642
  • [NO Library update] Update dependency androidx.compose.ui:ui to v1.7.6 by @renovate in #345
  • Update formatting of left column in reports by @mannodermaus in #644
  • [NO Library update] Remove upload artifact for docs by @takahirom in #648
  • [NO Library update] Update upload-pages-artifact by @takahirom in #649
  • [NO Library update] Update actions/deploy-pages by @takahirom in #650
  • Add multiple image assertion by @takahirom in #651
  • Add OpenAiAiAssertionModel 429 retry logic by @takahirom in #653

Full Changelog: 1.40.1...1.41.0

1.40.1

24 Jan 05:21
bb57d8c

Choose a tag to compare

New Feature: Add AiAssertionOptions.AssertionImageType to Support Actual Image Validation

We previously introduced AI Assertion which utilizes a comparison image for assertions. However, we noticed the current implementation struggled with optimal performance due to image size constraints, where sufficient context size is crucial for accurate AI analysis. To address this, we've introduced the AssertionImageType parameter. You can now specify the image type via AiAssertionOptions.

  sealed interface AssertionImageType {
    class Comparison : AssertionImageType
    class Actual : AssertionImageType
  }

Bug Fix: Improved AI Assertion OpenAI API Error Messaging

Previously, API error messages were unclear and unhelpful. We've revamped the error handling to provide meaningful feedback, including proper API status details.

Before:

Fields [object, created, model, choices] are required for type with serial name 'com.github.takahirom.roborazzi.ChatCompletionResponse', but they were missing at path: $
kotlinx.serialization.MissingFieldException: Fields [object, created, model, choices] are required for type with serial name 'com.github.takahirom.roborazzi.ChatCompletionResponse', but they were missing at path: $

After:

Caused by: java.util.concurrent.ExecutionException: com.github.takahirom.roborazzi.AiAssertionApiException: {
    "error": {
        "message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
        "type": "invalid_request_error",
        "param": null,
        "code": null
    }
}

Changes from 1.40.0

We initially introduced AssertionImageType.Reference instead of AssertionImageType.Actual in version 1.40.0. This was a mistake, as it referred to old images, a feature we've determined to be unnecessary. We have corrected this in the current release by using AssertionImageType.Actual.

What's Changed

  • [Not Roborazzi Library dependency update] Update actions/upload-artifact digest to 65c4c4a by @renovate in #619
  • [Not Roborazzi Library dependency update] Update dependency androidx.compose.material:material to v1.7.6 by @renovate in #629
  • [Not Roborazzi Library dependency update] Update dependency androidx.compose.runtime:runtime to v1.7.6 by @renovate in #630
  • [Not Roborazzi Library dependency update] Update dependency androidx.compose.ui:ui-test-junit4 to v1.7.6 by @renovate in #631
  • [Not Roborazzi Library dependency update] Update dependency androidx.compose.ui:ui-test-manifest to v1.7.6 by @renovate in #632
  • Add AssertionImageType to support reference image validation in AI Assertion by @takahirom in #637
  • Improve OpenAI api error handling by @takahirom in #638
  • Use class instead of object to maintain compatibility by @takahirom in #639
  • Use Actual image instead of Reference image for image assertion by @takahirom in #640

Full Changelog: 1.39.0...1.40.1