Skip to content

Releases: takahirom/roborazzi

1.5.0-alpha-2

24 Jul 23:23
ea015a2
Compare
Choose a tag to compare

I noticed that the Gradle test tasks can sometimes use the cache in some cases and skip screen shot tests. Therefore, I've improved this by using doNotCacheIf.

What's Changed

New Contributors

Full Changelog: 1.5.0-alpha-1...1.5.0-alpha-2

1.5.0-alpha-1

23 Jul 14:03
f14ff5f
Compare
Choose a tag to compare

Breaking Change ⚠️

When specifying the file path for output, the baseline (golden or reference) images will be saved at the specified location. However, images such as *_compare.png will now be saved in a different directory, specifically under build/outputs/roborazzi. This update, spotted by @simonwalter, helps prevent accidental commits of *_compare.png images to GitHub by users who only wish to save the baseline images. Users have the ability to revert the changed path by utilizing the outputDirectoryPath setting in RoborazziOptions' CompareOptions.For more information, check out the summary #125 (comment)

Bug Fix (Experimental) 🛠

We have addressed an issue where tasks might unexpectedly be skipped. As a solution, we have implemented an experimental feature that utilizes Gradle's output.

What's Changed

  • Alter the default output directory for comparison images and incorporate outputDirectoryPath into the comparison options by @takahirom in #128

Full Changelog: 1.4.0-rc-1...1.5.0-alpha-1

1.4.0-rc-1

23 Jul 10:55
df27a8f
Compare
Choose a tag to compare

⚠️ Breaking Changes from 1.3.x
This release introduces several changes to RoborazziRule.

  • Attention: CaptureType.None is now the default for RoborazziRule, disabling automatic captures. Use RoborazziRule with CaptureType.LastImage() to restore the previous automatic capture functionality.
    For more details, please refer to this issue #106

  • CaptureTypes has been converted into a class. As a result, you now need to call the constructor.
    Change RoborazziRule.CaptureType.Gif to RoborazziRule.CaptureType.Gif().

  • Gradle tasks (such as recordRoborazziDebug) will now take precedence over system properties (such as roborazzi.test.record=true). I believe this behavior is more intuitive.

🆕 New Features

  • Set RoborazziRule.Option.xxxx as the default file strategy for the captureRoboImage() function. For example, outputFileProvider will now be used when invoking captureRoboImage(). If you haven't specified an outputFileProvider, the behavior remains unchanged from previous versions.

What's Changed

  • Add support for default file path setting by RoborazziRule and refactor RoborazziRule by @takahirom in #105
  • Update options in README by @takahirom in #107
  • RoborazziOption can now be set in RoborazziRule and used in captureRoboImage() by @takahirom in #108
  • Set RoborazziRule.Option.outputFileProvider as the default file strategy for captureRoboImage() by @takahirom in #109
  • Add integration test by @takahirom in #110
  • Use CaptureType.None as the default option for RoborazziRule by @takahirom in #111
  • Fix the bug that outputFileProvider isn't applied by @takahirom in #112
  • [non api change]Rename folder to directory by @takahirom in #113
  • Add warning that the config under SDK 26 may not function properly and update Robolectric by @takahirom in #115
  • Fix issue test task is skippped unexpectedly by @takahirom in #116
  • Modernize AGP integration by @ZacSweers in #87
  • Fix issue system properties take precedence over gradle task by @takahirom in #118
  • Generate compare report even if we use system property by @takahirom in #119
  • Fix the compare task with system property doesn't output the summary report by @takahirom in #120
  • Add document about default unit test by @takahirom in #122

New Contributors

Full Changelog: 1.3.0...1.4.0-rc-1

1.4.0

11 Aug 05:45
758028f
Compare
Choose a tag to compare

⚠️ Breaking Changes from 1.3.x
This release introduces several changes to RoborazziRule.

  • Attention: CaptureType.None is now the default for RoborazziRule, disabling automatic captures. Use RoborazziRule with CaptureType.LastImage() to restore the previous automatic capture functionality.
    For more details, please refer to this issue #106

  • CaptureTypes has been converted into a class. As a result, you now need to call the constructor.
    Change RoborazziRule.CaptureType.Gif to RoborazziRule.CaptureType.Gif().

  • Gradle tasks (such as recordRoborazziDebug) will now take precedence over system properties (such as roborazzi.test.record=true). I believe this behavior is more intuitive.

🆕 New Features

  • Set RoborazziRule.Option.xxxx as the default file strategy for the captureRoboImage() function. For example, outputFileProvider will now be used when invoking captureRoboImage(). If you haven't specified an outputFileProvider, the behavior remains unchanged from previous versions.

What's Changed

  • Add support for default file path setting by RoborazziRule and refactor RoborazziRule by @takahirom in #105
  • Update options in README by @takahirom in #107
  • RoborazziOption can now be set in RoborazziRule and used in captureRoboImage() by @takahirom in #108
  • Set RoborazziRule.Option.outputFileProvider as the default file strategy for captureRoboImage() by @takahirom in #109
  • Add integration test by @takahirom in #110
  • Use CaptureType.None as the default option for RoborazziRule by @takahirom in #111
  • Fix the bug that outputFileProvider isn't applied by @takahirom in #112
  • [non api change]Rename folder to directory by @takahirom in #113
  • Add warning that the config under SDK 26 may not function properly and update Robolectric by @takahirom in #115
  • Fix issue test task is skippped unexpectedly by @takahirom in #116
  • Modernize AGP integration by @ZacSweers in #87
  • Fix issue system properties take precedence over gradle task by @takahirom in #118
  • Generate compare report even if we use system property by @takahirom in #119
  • Fix the compare task with system property doesn't output the summary report by @takahirom in #120
  • Add document about default unit test by @takahirom in #122

New Contributors

Full Changelog: 1.3.0...1.4.0

1.4.0-alpha-5

14 Jul 14:56
1cecf49
Compare
Choose a tag to compare

⚠️ Breaking changes

Gradle tasks (such as recordRoborazziDebug) will now take precedence over system properties (such as roborazzi.test.record=true). I believe this behavior is more intuitive.

For your information, you can execute Roborazzi along with the default unit test task. Thus, you can perform the screenshot test in Android Studio!
image

What's Changed

  • Fix issue system properties take precedence over gradle task by @takahirom in #118
  • Generate compare report even if we use system property by @takahirom in #119
  • Fix the compare task with system property doesn't output the summary report by @takahirom in #120
  • Add document about default unit test by @takahirom in #122

Full Changelog: 1.4.0-alpha-4...1.4.0-alpha-5

1.4.0-alpha-4

10 Jul 01:25
b2c59d1
Compare
Choose a tag to compare

This release shouldn't include any behavior changes. It does, however, include some bug fixes and refactoring related to the Gradle Plugin. Thanks to @ZacSweers for modernizing the AGP integration and to @qdsfdhvh and @galisamas for their bug reports!

What's Changed

  • [non api change]Rename folder to directory by @takahirom in #113
  • Add warning that the config under SDK 26 may not function properly and update Robolectric by @takahirom in #115
  • Fix issue test task is skippped unexpectedly by @takahirom in #116
  • Modernize AGP integration by @ZacSweers in #87

New Contributors

Full Changelog: 1.4.0-alpha-3...1.4.0-alpha-4

1.4.0-alpha-3

08 Jul 14:16
b5c6b62
Compare
Choose a tag to compare

⚠️ Breaking Changes from 1.3.x
This release introduces several changes to RoborazziRule.

  • CaptureType.None is now the default option for RoborazziRule.
    For more details, please refer to this issue #106

  • CaptureTypes has been converted into a class. As a result, you now need to call the constructor.
    Change RoborazziRule.CaptureType.Gif to RoborazziRule.CaptureType.Gif().

🆕 New Features

  • Set RoborazziRule.Option.outputFileProvider as the default file strategy for the captureRoboImage() function. outputFileProvider will now be used when invoking captureRoboImage(). If you haven't specified an outputFileProvider, the behavior remains unchanged from previous versions.

The following code outputs **custom_outputDirectoryPath**/**custom_outputFileProvider**-com.github.takahirom.roborazzi.sample.RuleTestWithPath.captureRoboImage.png

@RunWith(AndroidJUnit4::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
class RuleTestWithPath {
  @get:Rule
  val roborazziRule = RoborazziRule(
    options = Options(
      outputDirectoryPath = "$DEFAULT_ROBORAZZI_OUTPUT_DIR_PATH/custom_outputDirectoryPath",
      outputFileProvider = { description, outputDirectory, fileExtension ->
        File(
          outputDirectory,
          "custom_outputFileProvider-${description.testClass.name}.${description.methodName}.$fileExtension"
        )
      }
    ),
  )

  @Test
  fun captureRoboImage() {
    launch(MainActivity::class.java)
    onView(isRoot()).captureRoboImage()
  }
}

What's Changed

  • Set RoborazziRule.Option.outputFileProvider as the default file strategy for captureRoboImage() by @takahirom in #109
  • [CI] Add integration test by @takahirom in #110
  • Use CaptureType.None as the default option for RoborazziRule by @takahirom in #111
  • Fix the bug that outputFileProvider isn't applied by @takahirom in #112

Full Changelog: 1.4.0-alpha-2...1.4.0-alpha-3

1.4.0-alpha-2

22 Jun 01:22
74f4878
Compare
Choose a tag to compare

⚠️ Breaking Changes from 1.3.x
This release introduces several changes to RoborazziRule.

Refactored RoborazziRule.Options parameter.

Before:

RoborazziRule.Options(
  captureType = CaptureType.LastImage,
  outputFileProvider = xxx
)

After:

RoborazziRule.Options(
  captureType = CaptureType.LastImage(
    outputFileProvider = xxx
  )
)

The roborazziOptions property in RoborazziRule.Options now determines the default options for captureRoboImage(). If an option is not specified for captureRoboImage(), it will use the roborazziOptions defined in RoborazziRule.Options.

In addition, the outputDirectoryPath property in RoborazziRule.Options now influences the default storage path for captureRoboImage(). If a file name is not specified for captureRoboImage() and RoborazziRule.Options.outputDirectoryPath is used, the file path will be adjusted accordingly.

New Feature

Added CaptureType.None. This allows you to simply provide the outputDirectoryPath and RoborazziOptions when using RoborazziRule.

Bug fix

CaptureType.LastImage, which is the default parameter of RoborazziRule, used to take a lot of screenshots to capture the last image. Now, a screenshot is taken simply after the test.

Notice
We're considering changing the default parameter of RoborazziRule from CaptureType.LastImage to CaptureType.None. We'd appreciate your thoughts on this. #106

What's Changed

  • RoborazziOption can now be set in RoborazziRule and used in captureRoboImage() by @takahirom in #108

Full Changelog: 1.4.0-alpha-1...1.4.0-alpha-2

1.4.0-alpha-1

21 Jun 01:21
0f56cf1
Compare
Choose a tag to compare

⚠️ This version has been deprecated. We're planning to introduce additional changes. Please wait for version 1.4.0-alpha-2 or continue to use version 1.3.0-rc-1 in the meantime.

⚠️ Breaking Change
This release introduces several changes to RoborazziRule.

  • Refactored RoborazziRule.Options parameter.

    Before:

    RoborazziRule.Options(
      captureType = CaptureType.LastImage,
      roborazziOptions = xxx
    )

    After:

    RoborazziRule.Options(
      captureType = CaptureType.LastImage(
        roborazziOptions = xxx
      )
    )
  • The outputDirectoryPath property of RoborazziRule.Options now influences the default storage path for captureRoboImage(). If you don't specify a file name for captureRoboImage() and you use RoborazziRule.Options.outputDirectoryPath, the file path will change accordingly.

New Feature

  • Added CaptureType.None. This allows you to simply provide the outputDirectoryPath when using RoborazziRule.

Bug fix

  • CaptureType.LastImage, which is the default parameter of RoborazziRule, used to take a lot of screenshots to capture the last image. Now, a screenshot is taken simply after the test.

What's Changed

  • Add support for default file path setting by RoborazziRule and refactor RoborazziRule by @takahirom in #105

Full Changelog: 1.3.0-rc-1...1.4.0-alpha-1

1.3.0-rc-1

20 Jun 00:46
16f7b5f
Compare
Choose a tag to compare

⚠️ Breaking changes from 1.2.0

⚠️ For those using the Compose lambda captureRoboImage{} function, please add testImplementation("io.github.takahirom.roborazzi:roborazzi-compose:[version]") as a dependency. This is to separate the Compose Compiler from the roborazzi module and fix projects without compose.

⚠️ The default filename has changed. The new default filename will follow this format: com.github.takahirom.roborazzi.sample.ManualTest.captureRoboImageSample.png, replacing the old format: com_github_takahirom_roborazzi_sample_ManualTest.captureRoboImageSample.png.
You can use roborazzi.record.namingStrategy=escapedTestPackageAndClassAndMethod to fix the breaking change. For moere information please checkout https://github.com/takahirom/roborazzi/releases/tag/1.3.0-alpha-1

What's Changed

Full Changelog: 1.2.0...1.3.0-rc-1