All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
But we group the changes as follows:
- Breaking Changes when a change requires manual activity at update.
- Bug Fixes when we fix broken functionality.
- New Features for added functionality.
- Improvements for other changed parts.
[TOC]
- Add path info to filter, after they where missing in last release because of
FileSystemAlreadyExistsException
fix. - Fix some cases where applying deleted elements would not remove them from the Golden Master.
- Fix duplicate uploads to rehub for one test report.
- Support multiple values, like in
grid-template-columns
in PixelDiffFilter.
- Better logging and fix small code smells to improve stability and performance.
- Update dependencies to fix bugs and security issues.
- Since 01.12.2020 this project is owned and developed by UBS Hainer GmbH.
- Update the storage library used for reports (kryo 4 -> 5), it's possible that older test reports can't longer be read.
- Fix a rare
java.nio.file.FileSystemAlreadyExistsException
when accessing filters concurrently. - Fix 1-click-maintenance not respecting the key of the
AttributeDifference
. - Updated and now configurable URLs for rehub backend services
- The recheck configuration is now additionally read from environment variables and from file
${user.home}/.retest/retest.properties
. - Metadata differences are now filterable via the recheck.ignore. New
volatile-metadata.filter
andmetadata.filter
filters have been added, where the first one filters metadata which is added for diagnosing purposes and too verbose to be displayed upon every change and the latter filters all metadata. They can be imported withimport: volatile-metadata.filter
andimport: metadata.filter
inrecheck.ignore
. - Add
exclude()
filter expression to allow child elements to be excluded. Ignoring an elementmatcher: type=body, exclude(matcher: type=button)
will ignore everything below thebody
element but still capture changes forbutton
elements. - Add a
disableReportUpload
method. - The
ProjectLayout
will now be automatically detected (Maven and Gradle) and will throw an error if it cannot fall back to Maven, in which case a customProjectLayout
has to be provided. - In case of an exception in the filter code, it will be treated as not filtered.
- Have the console output much more compact in terms of whitespace used. Con: makes it harder to spot difference details...
- Project discovery and initialization is now done within
RecheckOptionsBuilder#build
instead ofRecheckImpl#new
to allow earlier access to project variables (e.g. retest.properties). Projects (i.e..retest
folders) should still be detected correctly.
- Fix accepting of attributes without warning deletes warnings of similar attribute differences.
- Fix NPE when applying an identifying attribute that has been inserted.
- Fix 1-click-maintenance not respecting the key of the
AttributeDifference
.
- Removed the now obsolete
RandomSuffixRetestIdProvider
class.
- Fix
java.lang.ClassCastException
:de.retest.recheck.ui.diff.InsertedDeletedElementDifference
cannot be cast tode.retest.recheck.ui.diff.IdentifyingAttributesDifference
. - Fix similar differences between checks not being accepted together, bringing back 1-click-maintenance.
- The
Highlighter
interface enables to define custom highlighting for certain keywords defined in the printers intended for the console output (e.g. using recheck.cli). - Add ignore rule that allows to ignore elements based on any of their attributes. E.g. for text it works like so:
matcher: text=Sign In
.
- Introduce property
de.retest.recheck.rehub.upload.attempts=3
to retry report uploads to rehub if they fail (e.g. due to unstable connections). This will reduce failing tests if the upload fails.
- Fix authentication not working because service URL has been changed to a more human readable format.
- Fix that using the import filter statement
import: ${name}
caused an infinite loop, although the filter specified had no cyclic dependencies.
- When defining an ignore rule with element and attribute, this rule is now applied to the whole subtree, i.e. all child elements of the specified element. We found that this is more intuitive and straightforward and more often what people would expect. Also, it is more in line with the current behavior when just ignoring an element (which also ignores all of its child elements).
- Fixed a bug where, when filtering for classes, the given classes had to contain all of the elements classes, not the other way around.
- You can now specify that e.g. the pixel-diff filter should only apply to a specific subtree of the given elements, or to only a specific attribute. For more details, see the docs.
- You can now specify that a specific value-regex should be filtered, either globally, for specific elements or specific attributes. This allows to e.g. ignore a date, but still ensure that it is actually a valid date.
- You can now specify to ignore a percentage color-diff, much like a pixel-diff. This allows to ignore, e.g. minor color changes or changes where opacity value is added or missing. Can be added globally, per element or attribute or combination thereof.
- Add the option to filter elements based on whether they are inserted, deleted or changed.
- The report output now displays the
retestId
:input (input-retest-id) at 'html[1]/body[1]/input[1]'
. This may be used, for example, by a filter:matcher: retestId=input-retest-id
.
- File names in log output should now always be in single quotes, making it easier to distinguish and select them.
- Printer layout is improved (in
MetadataDifferencePrinter
andAttributeDifferencePrinter
). Differences will now be printed per line and aligned for easier comparison. - Prefer the text over the ID in the default recheckId provider, because the ID is often generated, the text never is.
- Reports before version 1.9.0 cannot be loaded anymore. Simply re-run your tests with the new recheck version to create them again.
- The project root is not searched for multiple times on startup of recheck.
- Add timeout in case it takes too long to detect the current Git branch.
- Don't print metadata prefix if the all given metadata differences are ignored.
- The
ProjectLayout
may now retrieve the test source root for the current project in order to allow for test healing to be applied. This is required for customProjectLayouts
to be implemented, in order for this feature to work. For more information, please refer to the documentation. - Use
import: $reference
to import another filter into a filter or an ignore file. Ignoring all positioning changes is now easily possible withimport: positioning.filter
. Whole cascades and hierarchies of filters can now be created this way.
- In case there is no project specific ignore, fall back to the recheck.ignore file in the home directory for applied changes.
- Remove compile level dependency on logback.
- When updating Golden Masters, now the name of the file is returned, not the name of the Golden Master.
- Reports before version 1.8.0 cannot be loaded anymore. Simply re-run your tests with the new recheck version to create them again.
- Fix
.retest/retest.properties
not being read. You can now use this file to configure recheck and its extensions.
- Ignore filters can now be set globally by creating a '.retest' folder with a 'recheck.ignore' file in the user home directory.
- Retrieve and handle metadata from the recheck adapter.
- Retrieve metadata for the created Golden Master or SUT state that contains the following:
- Operating system name and version.
- Machine name (if available).
- Date and time.
- Git branch and commit.
- Display specific metadata will after test execution when printing the differences. This includes the following:
- Operating system name and version.
- Switched the underlying JavaScript engine (used for, e.g.,
recheck.ignore.js
) by replacing Nashorn (deprecated) with Mozilla's Rhino. - Added 'target', 'rel' and 'xmlns' as attributes to invisible filters and 'scale' as attribute to style filter.
- Support XPath in the ignore file also directly like it's returned from Chrome (e.g.
/html/body/div[3]
). - Changed the definition of the ignore rules from
matcher: id=title, attribute: font
tomatcher: id=title, attribute=font
and frommatcher: id=title, attribute-regex: font-.*
tomatcher: id=title, attribute-regex=font-.*
to be more consistent. recheck will automatically migrate existingrecheck.ignore
files. - Change the pixel-diff filter to use the unit of measure. Existing filters will be converted to
px
.
- Reports before version 1.7.0 cannot be loaded anymore. Simply re-run your tests with the new recheck version to create them again.
- Fixed that JavaScript filters were not executed again after an error has been thrown.
- Change the default element identification mechanism within the
recheck.ignore
file (i.e. when using CLI or GUI) from XPath to retestId. - Display suite description for test report printing so that tests now can properly be identified with their parent suite.
- Improved log messages of faulty JavaScript filters to show the file where the error actually happened.
- Do not parse the CSS attribute
box-shadow
for the filterpixel-diff
. - Update screenshots always instead of never.
- Matching elements now properly ignores child elements for identifying attributes other than XPath.
- Add some more
RetestIdProviders
:de.retest.recheck.ui.descriptors.idproviders.RandomSuffixRetestIdProvider
: Add a random suffix to the element.de.retest.recheck.ui.descriptors.idproviders.ElementCountingRetestIdProvider
: Add a counter suffix to the element.
- Add new element matcher for
class
attribute, which allows elements to be ignored bymatcher: class=some-class
.
RecheckImpl
can now be initialized as a member variable without additional parameters if inside a test class.- The screenshot does now have a fixed filename. This makes it much easier to work with VCS.
- Add sensible default values to the recheck.ignore file that is installed. This will only be created with new project.
- Improve the
RecheckOptions
and itsBuilder
.
- Fix a bug, where loading ignore files didn't work properly.
- Display inserted and deleted elements correctly.
- Fix a nasty bug, where the
retestId
sometimes changed upon persisting as XML.
- The persisted binary report now contains the version number of the recheck version that persisted it.
- The persisted binary report now is also zipped, reducing file size.
- On error during creating the persisted binary report file, delete the file to not leave corrupt files behind.
- The recheck API key can now be accessed via
Rehub#getRecheckApiKey()
. - Give better error message, if using rehub and no API key is specified.
- Move HTML attributes to the correct filters.
- Treat
*.filter.ignore.js
files as normal filter files. - Cache calls to JavaScript filter to improve performance.
- Introduce new
NamingStrategy
andProjectLayout
to replace oldFileNamerStrategy
, but be downwards compatible for now.
In previous releases changes were unlogged...