Releases: ndtp/android-testify
Intellij Plugin 2.4.0
[2.4.0]
- Added support for Android Studio Ladybug | 2024.2.1 Canary 9 | 242.+
3.2.0
Intellij Plugin 2.3.0
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
3.0.0
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
- The Testify Gradle Plugin now supports Gradle Configuration Cache.
- Gradle Plugin now uses Junit5 tests.
- #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
2.0.0
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
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
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
2.0.0-rc01
Library
Changed
ScreenshotRule.getScreenshotInstrumentationAnnotation()
is now a top-level function.Collection<Annotation>.getAnnotation()
renamed toCollection<Annotation>.findAnnotation()
.- Package for
getScreenshotAnnotationName()
changed fromdev.testify.internal.extensions
todev.testify.annotation
. ScreenshotRule.initializeView()
is now a top-level function.EspressoHelper
now extendsScreenshotLifecycle
andbeforeScreenshot()
has been replaced withafterInitializeView()
- Moved
dev.testify.internal.assertExpectedDevice
todev.testify.core.assertExpectedDevice
- Moved
dev.testify.internal.Configurable
todev.testify.core.Configurable
- Moved
dev.testify.internal.DEFAULT_FOLDER_FORMAT
todev.testify.core.DEFAULT_FOLDER_FORMAT
- Moved
dev.testify.internal.DEFAULT_NAME_FORMAT
todev.testify.core.DEFAULT_NAME_FORMAT
- Moved
dev.testify.internal.DeviceStringFormatter
todev.testify.core.DeviceStringFormatter
- Moved
dev.testify.internal.exception.ActivityMustImplementResourceOverrideException
todev.testify.core.exception.ActivityMustImplementResourceOverrideException
- Moved
dev.testify.internal.exception.ActivityNotRegisteredException
todev.testify.core.exception.ActivityNotRegisteredException
- Moved
dev.testify.internal.exception.AssertSameMustBeLastException
todev.testify.core.exception.AssertSameMustBeLastException
- Moved
dev.testify.internal.exception.FailedToCaptureBitmapException
todev.testify.core.exception.FailedToCaptureBitmapException
- Moved
dev.testify.internal.exception.FinalizeDestinationException
todev.testify.core.exception.FinalizeDestinationException
- Moved
dev.testify.internal.exception.MissingAssertSameException
todev.testify.core.exception.MissingAssertSameException
- Moved
dev.testify.internal.exception.MissingScreenshotInstrumentationAnnotationException
todev.testify.core.exception.MissingScreenshotInstrumentationAnnotationException
- Moved
dev.testify.internal.exception.NoScreenshotsOnUiThreadException
todev.testify.core.exception.NoScreenshotsOnUiThreadException
- Moved
dev.testify.internal.exception.RootViewNotFoundException
todev.testify.core.exception.RootViewNotFoundException
- Moved
dev.testify.internal.exception.ScreenshotBaselineNotDefinedException
todev.testify.core.exception.ScreenshotBaselineNotDefinedException
- Moved
dev.testify.internal.exception.ScreenshotIsDifferentException
todev.testify.core.exception.ScreenshotIsDifferentException
- Moved
dev.testify.internal.exception.ScreenshotTestIgnoredException
todev.testify.core.exception.ScreenshotTestIgnoredException
- Moved
dev.testify.internal.exception.TestifyException
todev.testify.core.exception.TestifyException
- Moved
dev.testify.internal.exception.TestMustWrapContextException
todev.testify.core.exception.TestMustWrapContextException
- Moved
dev.testify.internal.exception.UnexpectedDeviceException
todev.testify.core.exception.UnexpectedDeviceException
- Moved
dev.testify.internal.exception.UnexpectedOrientationException
todev.testify.core.exception.UnexpectedOrientationException
- Moved
dev.testify.internal.exception.ViewModificationException
todev.testify.core.exception.ViewModificationException
- Moved
dev.testify.internal.ExclusionRectProvider
todev.testify.core.ExclusionRectProvider
- Moved
dev.testify.internal.formatDeviceString
todev.testify.core.formatDeviceString
- Moved
dev.testify.internal.getDeviceDescription
todev.testify.core.getDeviceDescription
- Moved
dev.testify.internal.getDeviceDimensions
todev.testify.core.getDeviceDimensions
- Moved
dev.testify.internal.logic.AssertionState
todev.testify.core.logic.AssertionState
- Moved
dev.testify.internal.logic.assertSame
todev.testify.core.logic.assertSame
- Moved
dev.testify.internal.logic.compareBitmaps
todev.testify.core.logic.compareBitmaps
- Moved
dev.testify.internal.logic.ScreenshotLifecycleHost
todev.testify.core.logic.ScreenshotLifecycleHost
- Moved
dev.testify.internal.logic.ScreenshotLifecycleObserver
todev.testify.core.logic.ScreenshotLifecycleObserver
- Moved
dev.testify.internal.logic.takeScreenshot
todev.testify.core.logic.takeScreenshot
- Moved
dev.testify.internal.processor._executorDispatcher
todev.testify.core.processor._executorDispatcher
- Moved
dev.testify.internal.processor.capture.canvasCapture
todev.testify.core.processor.capture.canvasCapture
- Moved
dev.testify.internal.processor.capture.createBitmapFromDrawingCache
todev.testify.core.processor.capture.createBitmapFromDrawingCache
- Moved
dev.testify.internal.processor.capture.pixelCopyCapture
todev.testify.core.processor.capture.pixelCopyCapture
- Moved
dev.testify.internal.processor.capture.PixelCopyCaptureKt;
todev.testify.core.processor.capture.PixelCopyCaptureKt;
- Moved
dev.testify.internal.processor.compare.colorspace.calculateDeltaE
todev.testify.core.processor.compare.colorspace.calculateDeltaE
- Moved
dev.testify.internal.processor.compare.FuzzyCompare
todev.testify.core.processor.compare.FuzzyCompare
- Moved
dev.testify.internal.processor.compare.sameAsCompare
todev.testify.core.processor.compare.sameAsCompare
- Moved
dev.testify.internal.processor.createBitmap
todev.testify.core.processor.createBitmap
- Moved
dev.testify.internal.processor.diff.HighContrastDiff
todev.testify.core.processor.diff.HighContrastDiff
- Moved
dev.testify.internal.processor.maxNumberOfChunkThreads
todev.testify.core.processor.maxNumberOfChunkThreads
- Moved
dev.testify.internal.processor.ParallelPixelProcessor
todev.testify.core.processor.ParallelPixelProcessor
- Moved
dev.testify.internal.ScreenshotRuleCompatibilityMethods
todev.testify.core.ScreenshotRuleCompatibilityMethods
- Moved
dev.testify.internal.TestifyConfiguration
todev.testify.core.TestifyConfiguration
- Moved
dev.testify.internal.TestName
todev.testify.core.TestName
Added
isRunningOnUiThread()
added as a top-level function.outputFileName()
added as an extension method forContext
.- Interface
AssertionState
- Interface
ScreenshotLifecycleHost
assertSame()
is now available as a top-level function, decoupled fromScreenshotRule
Removed
open fun ScreenshotRule.generateHighContrastDiff(baselineBitmap: Bitmap, currentBitmap: Bitmap)
has been removed. Useclass HighContrastDiff
directly.ScreenshotRule.applyViewModifications()
has been removed. UseTestifyConfiguration.applyViewModificationsMainThread()
instead.
Fixed
- #175: Output from Gradle Managed Devices now named according to Testify naming strategy