-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for pixel-by-pixel comparison of screenshots #403
Comments
Once this is groomed, I'd like to review the approach taken. |
@sergio-sastre Hello. We're not sure if it's in the Kaspresso area We can implement a method for tests that will screenshot the screen during the test run, compare it with the reference value and show the difference But we see a lot of edge cases, such as runs on different devices. Do you think it makes sense to do this within the Kaspresso, or should it be done outside? |
I reviewed several approaches for pixel-by-pixel comparison on github. There are a lot of simple solutions, with just pixel diff (and recolored pixel diff) and more complex solutions with side image comparison tools on lua/python. The main questions are:
We can write some gradle plugin that can integrate our reference images by command in AS project (for example, src/main/references). But is it really in the Kaspresso area ? It's more like an infrastructure tool, that is not related for Kaspresso capabilities as a Test framework. Also, i think that most of production teams will create some kind of CI/CD tools to handle reference images on their pipelines.
As a UI test frame we need to provide basic solution out of the box, so again we need to write some sh scripts to create one ideal "emulator" but the UI view is not deterministic even around one emulator (also Kaspresso in this cases needs to manage folders for different resolutions like android resources for example). Again seems to be like CI/CD pipelines work.
The most simple solution as i mentioned was pixel by pixel diff with % threshold. As a output we'll have the screenshoted image and reference image with recolored pixel diff, but i think it's too simple solution for Kaspresso. As for more complex solutions i think again it will be better to run on CI/CD pipelines cause of running complicated 3rd party tools is a bit too much for an on device ui test framework.
In conclusion, as we discussed with @AzamatCherchesov and team, now we won't do anything related for pixel-by-pixel comparison cause it's not Kaspresso related feature from our point of view. Maybe we can create another one 3rd party tool for that problem, but not in Kaspresso for now. |
@AzamatCherchesov @Areyana Completely agree on that. What could be interesting is to add some samples in Kaspresso on how you can use it together with e.g Shot and Paparazzi |
No description provided.
The text was updated successfully, but these errors were encountered: