Skip to content

Releases: takahirom/roborazzi

1.32.0

06 Nov 02:45
01f7df8
Compare
Choose a tag to compare
1.32.0 Pre-release
Pre-release

Experimental WebP support and other image formats

You can set roborazzi.record.image.extension to webp in your gradle.properties file to generate WebP images.
To enable WebP support, add testImplementation("io.github.darkxanter:webp-imageio:0.3.3") to your build.gradle.kts file.

roborazzi.record.image.extension=webp

WebP is a lossy image format by default, which can make managing image differences challenging. To address this, we provide a lossless WebP image feature.

onView(ViewMatchers.withId(R.id.textview_first))
  .captureRoboImage(
    roborazziOptions = RoborazziOptions(
      recordOptions = RoborazziOptions.RecordOptions(
        imageIoFormat = LosslessWebPImageIoFormat(),
      ),
    )
  )

You can also use other image formats by implementing your own AwtImageWriter and AwtImageLoader.

data class JvmImageIoFormat(
  val awtImageWriter: AwtImageWriter,
  val awtImageLoader: AwtImageLoader
) : ImageIoFormat

Adjustments to AI-Powered Image Assertion

In version 1.30.0, we introduced Roborazzi AI-Powered Image Assertion.

  • The OpenAiAiAssertionModel, which utilizes OpenAI APIs, previously lacked a timeout specification, leading to frequent timeout issues. We have now implemented a customizable timeout setting.
  • The provideRoborazziContext().option was marked as InternalRoborazziApi despite being documented in the README. We have now changed it to ExperimentalRoborazzi API.

What's Changed

  • Make OpenAiAiAssertionModel httpClient customizable and add timeout setting by @takahirom in #541
  • Add settings panel for configuring Roborazzi tasks explanation by @sanao1006 in #537
  • Add the ability to change File writers and readers and add support for lossless WebP by @takahirom in #529
  • Make image extension changeable by @takahirom in #527
  • fix(deps): update dependency androidx.compose.ui:ui-test-junit4 to v1.7.5 by @renovate in #526
  • Make RoborazziContextImpl.options ExperimentalRoborazziApi by @takahirom in #544

Full Changelog: 1.31.0...1.32.0

1.31.0

05 Nov 03:51
4945b3a
Compare
Choose a tag to compare

Added Experimental Support for Cleaning Up Old Screenshots

This release introduces the roborazzi.cleanupOldScreenshots=true option in gradle.properties, allowing users to automatically remove outdated screenshots. By default, this is set to false to prevent accidental deletions when running filtered tests. Please note that enabling this option may result in unintended deletions when running filtered tests. You can use -Proborazzi.cleanupOldScreenshots=true for CI configurations to clean up screenshots only in CI runs without affecting local settings.
This cleanup implementation may affect the cache mechanism. We have some integration tests in place, but if you notice any issues, please let us know.
Thank you, @JackEblan, for suggesting the cleanup feature!

Improve AI Assertion Error Message

In the previous release, we introduced Roborazzi AI-Powered Image Assertion.
When an AI assertion fails, it’s important to review the screenshots to understand what went wrong with the images. Therefore, I enhanced the error message to include the file paths of the images.

image

What's Changed

Full Changelog: 1.30.1...1.31.0

1.30.1

03 Nov 12:59
a278527
Compare
Choose a tag to compare

Roborazzi AI-Powered Image Assertion 🤖 ✨

Roborazzi introduces an experimental AI-powered image assertion feature to simplify and scale the process of verifying screenshot test content. This feature helps automate tedious visual checks by comparing images based on customizable AI prompts, utilizing either the Gemini API or OpenAI API. It only activates when images differ, conserving resources. Additionally, manual AI assertion is available, allowing users to leverage local language models without external dependencies.
We don't include Gemini or OpenAI dependencies in the roborazzi module. To use these models, you can add either roborazzi-ai-gemini or roborazzi-ai-openai as dependencies.

  onView(ViewMatchers.isRoot())
    .captureRoboImage(
      roborazziOptions = provideRoborazziContext().options.addedAiAssertion(
        assertionPrompt = "The screen should have a PREVIOUS button",
      )
   )

For more information, please check out this documentation page:
https://takahirom.github.io/roborazzi/ai-powered-image-assertion.html

Roborazzi Compose Preview Support now supports the device parameter@Preview(device = "") 📱

Roborazzi Compose Preview Support uses ComposablePreviewScanner and ComposablePreviewScanner now supports parsing device parameter. It is introduced to Compose Preview Support. Thank you, @sergio-sastre, for developing this adapter and integrating it with Roborazzi.
If you are using Roborazzi Compose Preview Support with device parameters, you need to update your ComposablePreviewScanner to version 0.4.0.

Remove Context Receiver from roborazzi-desktop ♻️

The Context Receiver in Kotlin is now deprecated, so we need to remove it. The context(DesktopComposeUiTest) requirement existed because the file compose/ui/ui-test/src/skikoMain/kotlin/androidx/compose/ui/test/SkikoImageHelpers.kt was previously unavailable, necessitating the use of DesktopComposeUiTest. Now that SkikoImageHelpers is available, we can eliminate the context(DesktopComposeUiTest) requirement.

This functionality was introduced in the Compose Multiplatform core repository (commit 1664fba: JetBrains/compose-multiplatform-core@1664fba) and has been supported since Compose Multiplatform version 1.5.12 (https://github.com/JetBrains/compose-multiplatform-core/releases/tag/v1.5.12).
Please note that this may be a breaking change if you are using Compose Multiplatform version 1.5.12 or earlier.

Changes from 1.30.0

  • Breaking changes to 1.30.0:
    Renamed parameter assertPrompt to assertionPrompt.

  • Use max_tokens instead of max_completion_tokens for the OpenAI API:
    Although max_tokens has been deprecated, we still need to use it in certain environments.

What's Changed

  • [Documentation] Add description how to configure Differ by @darekbx in #507
  • [Idea Plugin] Fix the issue with the Roborazzi Idea Plugin not being able to display images by @takahirom in #504
  • [CI] Update actions/checkout digest to eef6144 by @renovate in #509
  • [CI] Update actions/upload-artifact digest to b4b15b8 by @renovate in #510
  • [CI] Add dependency diff by @takahirom in #514
  • [CI] Fix dependency diff workflow by @takahirom in #516
  • [CI] Fix comment workflow diff path by @takahirom in #517
  • [Sample/Tests dependency. Not library dependency] Update dependency androidx.compose.ui:ui-test-junit4 to v1.7.4 by @renovate in #469
  • [CI] Pin dependencies by @renovate in #518
  • [CI] Update actions/checkout digest to 11bd719 by @renovate in #519
  • [BREAKING CHANGE in Roborazzi Plugin (I believe this library is not very popular, so I don't anticipate any issues, but please let me know if anything comes up.)] Update dependency org.webjars:webjars-locator-lite to v0.0.6 by @renovate in #425
  • [Sample/Tests dependency. Not library dependency] Update dependency androidx.compose.material3:material3 to v1.3.0 by @renovate in #521
  • [Sample/Tests dependency. Not library dependency] Update dependency androidx.compose.material:material to v1.7.5 by @renovate in #523
  • [Sample/Tests dependency. Not library dependency] Update dependency androidx.compose.material3:material3 to v1.3.1 by @renovate in #525
  • Try to remove context receiver of desktop by @takahirom in #533
  • Use RobolectricDeviceQualifierBuilder from ComposablePreviewScanner to support preview info "device" by @sergio-sastre in #530
  • Roborazzi AI-Powered Image Assertion by @takahirom in #491
  • Add roborazzi-ai-gemini roborazzi-ai-openai to dependency diff by @takahirom in #534
  • Fix the naming of assertPrompt to assertionPrompt by @takahirom in #535
  • Use max_tokens instead of max_completion_tokens for OpenAI API by @takahirom in #536

New Contributors

Full Changelog: 1.29.0...1.30.0
Full Changelog: 1.30.0...1.30.1

1.30.0

03 Nov 09:21
f3bf08e
Compare
Choose a tag to compare

Please refer to version 1.30.1

idea-1.9.0

19 Oct 04:14
80159e8
Compare
Choose a tag to compare

Roborazzi Idea Plugin now checks the report file.

Previously, the Roborazzi Idea Plugin used to check the file names in the build/output/roborazzi directory to find screenshots. However, since screenshots can be named and placed in various ways, the Roborazzi Idea Plugin now first checks the build/test-results/roborazzi/results-summary.json file to locate screenshots.

Thank you for reporting the issues, @timothyfroehlich and @Pschsch.

What's Changed

  • fix duplicate screenshot by @yuchan2215 in #494
  • Fix the issue with the Roborazzi Idea Plugin not being able to display images by @takahirom in #504

New Contributors

Full Changelog: idea-1.8.0...idea-1.9.0

1.29.0

13 Oct 02:42
2f78447
Compare
Choose a tag to compare

Bug Fixes

We introduced an image diff percentage in the report. However, when the screenshot's image size changes, there was an issue causing Roborazzi to crash. We have added a test for image size changes and fixed this problem. Thank you for reporting this. @Daiji256

Breaking Change

We are migrating our codebase to Kotlin Multiplatform (KMP). Roborazzi uses dropbox/differ to calculate image diffs. Thanks to @eyedol 's contribution, differ now supports KMP for iOS, so we updated dropbox/differ. Some KMP migration is still needed for iOS support.

What's Changed

  • Initial integration of differ to support iOS by @eyedol in #496
  • Add failing change size test and make diff percent nullable by @takahirom in #506

Full Changelog: 1.28.0...1.29.0

1.28.0

06 Oct 05:41
078140d
Compare
Choose a tag to compare

Breaking changes

Now we are using gradlePropertiesPrefixedBy to support Gradle Isolated Projects in the Roborazzi Gradle Plugin. This API requires Gradle 8.0. Gradle 8.0 was released early last year, and most projects I know use 8.0 or higher, so Roborazzi is going to use this API. If anyone can't use this, please let me know.
@trevjonez, thank you for telling me what we need to do to support this.
Currently, we aren't able to ensure compatibility with Gradle Isolated Projects, but this could bring some progress.

Adapting to the new ComposablePreviewScanner version

We are using ComposablePreviewScanner for Compose Preview Support. The ComposablePreviewScanner is now on Maven Central 🎉 and the group name of the libraries has changed. We have adapted to the new version and don't show errors when not using Jitpack and using the new packages.

What's Changed

  • Update AGP by @takahirom in #498
  • Use gradlePropertiesPrefixedBy instead of project.properties for Gradle Isolated Projects by @takahirom in #499
  • Remove verifyMavenRepository because ComposablePreviewScanner is now on Maven Central by @takahirom in #501

Full Changelog: 1.27.0...1.28.0

1.27.0

02 Oct 01:38
2e4b3eb
Compare
Choose a tag to compare

Bugfix for Compose Preview Support

As Compose Preview Support don't automatically add dependencies to maintain a single source of truth for user projects, they should show warnings when the required dependencies are missing. However, the warnings were not shown, so I fixed this issue. Thanks for reporting this! @kktaro

Diff Percentage to Report File

@vladcudoidem added the diff percentage to report files. You can use it in your CI workflow or project statistics.

The Roborazzi AI feature prototype is ongoing. 🤖

This version does not include it, but I've implemented a prototype for using AI for assertions. If you are interested, please check it out and leave feedback.
#491

What's Changed

  • [Sample / Tests]Update dependency androidx.compose.material:material to v1.6.8 by @renovate in #407
  • [Sample/Tests]Update androidx.test.ext.junit to v1.2.1 by @renovate in #468
  • [IntelliJ Plugin] Show screenshot filename multiple lines by @sanao1006 in #470
  • [IntelliJ Plugin] Filtering Images by Text Field by @sanao1006 in #476
  • [CI] chore(deps): update github artifact actions to v4 (major) by @renovate in #482
  • [Feature] Implement diff. percentage by @vladcudoidem in #480
  • [IntelliJ Plugin] fix duplicate screenshot by @yuchan2215 in #494
  • [Docs] update preview screenshot docs by @YusukeMoriJapan in #488
  • [Bug fixes] Fix preview dependency check by @takahirom in #495

New Contributors

Full Changelog: 1.26.0...1.27.0

idea-1.8.0

07 Sep 07:52
1924d40
Compare
Choose a tag to compare

Thanks again to @sanao1006's contribution, we now have searching support for file names in the Roborazzi IntelliJ Plugin.

video_filter.mov

What's Changed

Full Changelog: idea-1.7.0...idea-1.8.0

idea-1.7.0

20 Aug 01:10
91c5e45
Compare
Choose a tag to compare

Thanks to @sanao1006's contribution, we now have multi-line name support for file names in the Roborazzi IntelliJ Plugin.

robo_video.mov

https://plugins.jetbrains.com/plugin/24561-roborazzi

What's Changed

Full Changelog: 1.26.0...idea-1.7.0