Skip to content

Releases: ndtp/android-testify

Intellij Plugin 2.4.0

08 Sep 18:42
d9e8624
Compare
Choose a tag to compare

[2.4.0]

  • Added support for Android Studio Ladybug | 2024.2.1 Canary 9 | 242.+

3.2.0

04 Sep 14:12
6698806
Compare
Choose a tag to compare

3.2.0

  • #209: Replace Plugin-Local with Composite Build (#231)

Intellij Plugin 2.3.0

16 Jul 13:25
62a0b3b
Compare
Choose a tag to compare

2.3.0

  • #230 - Added a 'Go To Source' popup menu item to baseline image asset files. This action will navigate you from the PNG baseline image to the test source code.
  • #230 - Added a 'Baseline Image' destination in the Go To popup menu when right-clicking on the test source code. This action will navigate you to the baseline image for the current test.

2.2.0

  • #211 - Added support for Android Studio Koala | 2024.1.1 Canary 6 | 241.+

3.1.0

05 Jul 21:01
7ca3c76
Compare
Choose a tag to compare
  • #225 - Testify will now throw a LowMemoryException when attempts to allocate an IntBuffer fail. This can help users diagnose AVD configuration problems and reports on the state of the device.

3.0.0

16 Jun 20:46
1b01c7b
Compare
Choose a tag to compare

Changelog

  • #212 - Bug fixes and performance improvements for the ParallelPixelProcessor
    • Add parallelThreads extension property to the Gradle plugin. This allows for customization of the number of worker threads to be used by the ParallelProcessor. Set limits on the thread pool to a minimum of 1 and a maximum of 4.
    • Refactor the ParallelPixelProcessor and introduce a new configuration class to wrap the thread configuration variables and the CoroutineDispatcher configuration.
    • Several small improvements to the FuzzyCompare method to perform fewer allocations inside the analyze function
    • Upgrade UiAutomator dependency to 2.3.0 https://developer.android.com/jetpack/androidx/releases/test-uiautomator
    • Recycle the bitmaps in the finalize block of assertSame()
    • Add several new tests and enhancements to the existing ParallelProcessor tests
    • Upgrade the compile SDK for the samples to 34
  • #208 - Redefine plugin artifact to work with gradle plugin DSL
  • #201 - Added ScreenshotScenarioRule which works in conjunction with Android's ActivityScenario.
    • Added tests demonstrating the usage of ScreenshotScenarioRule.
    • Major overhaul of all documentation to include alternative instructions for using ScreenshotScenarioRule.
  • #198 Fixes #79: Testify incompatible with gradle configuration cache
  • #196 - Flix Library sample added
  • #192 - Flix Sample now uses Hilt instead of Koin for dependency injection
  • #191 - Added additional method documentation.

IntelliJ Plugin 2.1.0

22 Feb 14:18
73bbe7e
Compare
Choose a tag to compare

IntelliJ Plugin 2.1.0

Commits

Changes

  • Bump version to 2.1.0
  • Added support for Android Studio Jellyfish | 2023.3.1 Canary 10 | 233.+
  • Replaced deprecated API calls.
    • Dropped support for Android Studio versions 221.* and earlier (Electric Eel, Dolphin, Chipmunk, Bumblebee)

2.0.0

06 Dec 21:25
d9d4415
Compare
Choose a tag to compare

We're thrilled to announce the stable release of Testify 2.0, a significant leap forward in Android Screenshot Testing! 🎉 Testify empowers developers to enhance test coverage by including the UI layer in their testing, providing a robust tool for monitoring UI quality and detecting unintended changes in view rendering.

With Testify 2.0, effortlessly set up a variety of screenshot tests in your application, offering a new perspective for monitoring UI experiences and reviewing changes. This release marks a milestone, delivering a testing solution that seamlessly adapts to your needs, ensuring a dependable and feature-rich experience for Android developers. Establishing a comprehensive set of screenshot tests for your application has never been easier.

Key Goals of the Testify 2.0 Architecture

Core Functionality Separation

Testify 2.0 focuses on providing a highly customizable and configurable core library with pre-built solutions for common testing scenarios. The new architecture separates the core screenshot functionality from the JUnit4 lifecycle and AndroidTestRule, opening up new possibilities for expansion, customization, and adaptation to multiple testing requirements.

The core library in Testify 2.0 is designed to support classic Android Views, Compose UI, and Surface Views. It is highly modular, offering a scalable, programmable, and extensible API set to cover a wide range of testing scenarios. The primary goal of the 2.0 architecture was to separate Testify into extensible and reusable components, allowing unparalleled customization to meet all of your testing needs. For example, the new TestifyConfiguration class allows you to easily configure and customize your screenshot tests to handle a multitude of UI setups.

The new CaptureMethod and CompareMethod interfaces allow you to write and plug-in any custom screenshot capture or comparison logic you desire.

Many internal and helper functions are now available as public methods, allowing you to leverage Testify in new and original ways.

Plugins & Extensions

A key feature of the Testify 2.0 architecture is its use of Plugins and Extensions.

Plugins provide improvements to, and integrations with, common client-side development tools. Their goal is to improve developer productivity and happiness. The Gradle Plugin offers tasks for recording baseline images, running tests, viewing diagnostics, and generating reports, while the IntelliJ Platform Plugin provides GUI integration directly into Android Studio for accessing common actions.

Extensions offer developers the opportunity to expand upon the existing Testify patterns by easily slotting in new functionality. Provided Testify Extensions allow for testing accessibility, composables from Jetpack Compose, or capturing the whole screen. These extensions can be used to improve the quality of your tests or perform advanced testing scenarios. Or, you may now easily provide your own extensions to further customize Testify.

For example, the Fullscreen Capture Method allows you to capture the entire device screen, including system UI, dialogs, and menus.

The Accessibility Checks extension allows you to combine visual regression testing with accessibility checks to further improve the quality and expand the reach of your application.

Sample Application Enhancements

Testify 2.0 introduces additional, expressive sample codes to help get you started on with screenshot testing. You can now find examples showcasing Testify being used with Jetpack Compose, Gradle Managed Devices, Dependency Injection, and Android Clean Architecture.

The comprehensive set of sample applications demonstrate the usage of all public methods and extension libraries as well as providing examples of commonly tested scenarios.

How to Get Started

To explore the new features and improvements in Testify 2.0.0, follow our documentation for installation instructions and usage guidelines.

To learn how to tackle more advanced testing scenarios, check out our Recipe Book.

We encourage developers to provide feedback, report issues, and contribute to the Testify community on GitHub. Your insights help us make Testify even better!

Thank you for being a part of the Testify journey. Embrace the future of Android Screenshot Testing with Testify 2.0!

2.0.0-rc03

14 Nov 14:15
51953ca
Compare
Choose a tag to compare

2.0.0-rc03

Library

Fixed

  • Refactor ComposableScreenshotRule.setCaptureMethod() to call the configure() method.

Legacy Sample

Added

  • Added a Dialog sample to test as a demonstration of how to capture dialog boxes and also as a regression test for the bug with setCaptureMethod()

2.0.0-rc02

14 Nov 14:15
b1d3c3e
Compare
Choose a tag to compare

2.0.0-rc02

Library

Fixed

  • Fixed a bug in ComposableScreenshotRule.setCaptureMethod() where it was incorrectly ignoring the passed in captureMethod argument.

2.0.0-rc01

14 Nov 14:15
1761260
Compare
Choose a tag to compare

2.0.0-rc01

Library

Changed

  • ScreenshotRule.getScreenshotInstrumentationAnnotation() is now a top-level function.
  • Collection<Annotation>.getAnnotation() renamed to Collection<Annotation>.findAnnotation().
  • Package for getScreenshotAnnotationName() changed from dev.testify.internal.extensions to dev.testify.annotation.
  • ScreenshotRule.initializeView() is now a top-level function.
  • EspressoHelper now extends ScreenshotLifecycle and beforeScreenshot() has been replaced with afterInitializeView()
  • Moved dev.testify.internal.assertExpectedDevice to dev.testify.core.assertExpectedDevice
  • Moved dev.testify.internal.Configurable to dev.testify.core.Configurable
  • Moved dev.testify.internal.DEFAULT_FOLDER_FORMAT to dev.testify.core.DEFAULT_FOLDER_FORMAT
  • Moved dev.testify.internal.DEFAULT_NAME_FORMAT to dev.testify.core.DEFAULT_NAME_FORMAT
  • Moved dev.testify.internal.DeviceStringFormatter to dev.testify.core.DeviceStringFormatter
  • Moved dev.testify.internal.exception.ActivityMustImplementResourceOverrideException to dev.testify.core.exception.ActivityMustImplementResourceOverrideException
  • Moved dev.testify.internal.exception.ActivityNotRegisteredException to dev.testify.core.exception.ActivityNotRegisteredException
  • Moved dev.testify.internal.exception.AssertSameMustBeLastException to dev.testify.core.exception.AssertSameMustBeLastException
  • Moved dev.testify.internal.exception.FailedToCaptureBitmapException to dev.testify.core.exception.FailedToCaptureBitmapException
  • Moved dev.testify.internal.exception.FinalizeDestinationException to dev.testify.core.exception.FinalizeDestinationException
  • Moved dev.testify.internal.exception.MissingAssertSameException to dev.testify.core.exception.MissingAssertSameException
  • Moved dev.testify.internal.exception.MissingScreenshotInstrumentationAnnotationException to dev.testify.core.exception.MissingScreenshotInstrumentationAnnotationException
  • Moved dev.testify.internal.exception.NoScreenshotsOnUiThreadException to dev.testify.core.exception.NoScreenshotsOnUiThreadException
  • Moved dev.testify.internal.exception.RootViewNotFoundException to dev.testify.core.exception.RootViewNotFoundException
  • Moved dev.testify.internal.exception.ScreenshotBaselineNotDefinedException to dev.testify.core.exception.ScreenshotBaselineNotDefinedException
  • Moved dev.testify.internal.exception.ScreenshotIsDifferentException to dev.testify.core.exception.ScreenshotIsDifferentException
  • Moved dev.testify.internal.exception.ScreenshotTestIgnoredException to dev.testify.core.exception.ScreenshotTestIgnoredException
  • Moved dev.testify.internal.exception.TestifyException to dev.testify.core.exception.TestifyException
  • Moved dev.testify.internal.exception.TestMustWrapContextException to dev.testify.core.exception.TestMustWrapContextException
  • Moved dev.testify.internal.exception.UnexpectedDeviceException to dev.testify.core.exception.UnexpectedDeviceException
  • Moved dev.testify.internal.exception.UnexpectedOrientationException to dev.testify.core.exception.UnexpectedOrientationException
  • Moved dev.testify.internal.exception.ViewModificationException to dev.testify.core.exception.ViewModificationException
  • Moved dev.testify.internal.ExclusionRectProvider to dev.testify.core.ExclusionRectProvider
  • Moved dev.testify.internal.formatDeviceString to dev.testify.core.formatDeviceString
  • Moved dev.testify.internal.getDeviceDescription to dev.testify.core.getDeviceDescription
  • Moved dev.testify.internal.getDeviceDimensions to dev.testify.core.getDeviceDimensions
  • Moved dev.testify.internal.logic.AssertionState to dev.testify.core.logic.AssertionState
  • Moved dev.testify.internal.logic.assertSame to dev.testify.core.logic.assertSame
  • Moved dev.testify.internal.logic.compareBitmaps to dev.testify.core.logic.compareBitmaps
  • Moved dev.testify.internal.logic.ScreenshotLifecycleHost to dev.testify.core.logic.ScreenshotLifecycleHost
  • Moved dev.testify.internal.logic.ScreenshotLifecycleObserver to dev.testify.core.logic.ScreenshotLifecycleObserver
  • Moved dev.testify.internal.logic.takeScreenshot to dev.testify.core.logic.takeScreenshot
  • Moved dev.testify.internal.processor._executorDispatcher to dev.testify.core.processor._executorDispatcher
  • Moved dev.testify.internal.processor.capture.canvasCapture to dev.testify.core.processor.capture.canvasCapture
  • Moved dev.testify.internal.processor.capture.createBitmapFromDrawingCache to dev.testify.core.processor.capture.createBitmapFromDrawingCache
  • Moved dev.testify.internal.processor.capture.pixelCopyCapture to dev.testify.core.processor.capture.pixelCopyCapture
  • Moved dev.testify.internal.processor.capture.PixelCopyCaptureKt; to dev.testify.core.processor.capture.PixelCopyCaptureKt;
  • Moved dev.testify.internal.processor.compare.colorspace.calculateDeltaE to dev.testify.core.processor.compare.colorspace.calculateDeltaE
  • Moved dev.testify.internal.processor.compare.FuzzyCompare to dev.testify.core.processor.compare.FuzzyCompare
  • Moved dev.testify.internal.processor.compare.sameAsCompare to dev.testify.core.processor.compare.sameAsCompare
  • Moved dev.testify.internal.processor.createBitmap to dev.testify.core.processor.createBitmap
  • Moved dev.testify.internal.processor.diff.HighContrastDiff to dev.testify.core.processor.diff.HighContrastDiff
  • Moved dev.testify.internal.processor.maxNumberOfChunkThreads to dev.testify.core.processor.maxNumberOfChunkThreads
  • Moved dev.testify.internal.processor.ParallelPixelProcessor to dev.testify.core.processor.ParallelPixelProcessor
  • Moved dev.testify.internal.ScreenshotRuleCompatibilityMethods to dev.testify.core.ScreenshotRuleCompatibilityMethods
  • Moved dev.testify.internal.TestifyConfiguration to dev.testify.core.TestifyConfiguration
  • Moved dev.testify.internal.TestName to dev.testify.core.TestName

Added

  • isRunningOnUiThread() added as a top-level function.
  • outputFileName() added as an extension method for Context.
  • Interface AssertionState
  • Interface ScreenshotLifecycleHost
  • assertSame() is now available as a top-level function, decoupled from ScreenshotRule

Removed

  • open fun ScreenshotRule.generateHighContrastDiff(baselineBitmap: Bitmap, currentBitmap: Bitmap) has been removed. Use class HighContrastDiff directly.
  • ScreenshotRule.applyViewModifications() has been removed. Use TestifyConfiguration.applyViewModificationsMainThread() instead.

Fixed

  • #175: Output from Gradle Managed Devices now named according to Testify naming strategy