SHAFT is a unified test automation engine for web, mobile, API, CLI, database, and desktop e2e testing. Powered by best-in-class frameworks, SHAFT provides a wizard-like syntax to drive your automation efficiently, maximize your ROI, and minimize your learning curve with no limitations! Stop reinventing the wheel! Upgrade now!
In the current implementation of visual testing (image recognition) within Shaft Engine, reference images are named using a concatenation of the calling Java class method name and the element's xPath. This naming strategy ensures uniqueness but can lead to very long file names when dealing with complex xPaths, potentially exceeding the maximum character limit imposed by some operating systems
Feature Description:
I propose two potential solutions to this issue:
Hashing the Concatenated Name: Automatically generate a fixed-length hash (e.g., SHA-256) of the concatenation of the Java class method name and the path. This would significantly reduce the length of the file name while maintaining uniqueness.
Allow Custom Naming via Method Parameter: Overloading the image validation method (public ValidationsExecutor matchesReferenceImage()) to accept an optional parameter representing the desired name for the image file. This would provide flexibility when necessary, particularly in complex testing frameworks. And it would allow for an improved organization of the image resources.
Summary:
In the current implementation of visual testing (image recognition) within Shaft Engine, reference images are named using a concatenation of the calling Java class method name and the element's xPath. This naming strategy ensures uniqueness but can lead to very long file names when dealing with complex xPaths, potentially exceeding the maximum character limit imposed by some operating systems
Feature Description: I propose two potential solutions to this issue: