arquillian-rusheye
arquillian-rusheye copied to clipboard
RushEye in Maven Repo
Team,
This library works great in comparing images. However it would be great if it is part of Maven repo. Could you please make this library available in Maven repo?
@bartoszmajsak maybe we can add it in bintray and sync to maven central?
Is it something mature enough to get it out in the wild? @MatousJobanek I remember you mentioned a student working on it at some point
@vinsguru @bartoszmajsak Yeah, I think that there is no problem with putting this library into Maven central. IIRC the reason why it is not there already is that there was no need so far. There was a student that was working on it partially (on https://github.com/spriadka/graphene-visual-testing), but without any contribution into this project directly. Currently, there is another student who is interested in comparing images, but I'm afraid that his master thesis goes in different direction. Anyway +1 from my side for syncing it with Maven central.
@vinsguru have you used this library in a project?
My general thought is that it would be worth to try to bring it to ARQ as extension - now it's just a cli tool. WDYT @lordofthejars @MatousJobanek
@bartoszmajsak , Yes, I have been using it for the past 6 months without any issues. I do not use it as a CLI tool though. It is good to see that there is someone interested in Graphene visual validation. Because that is how I exactly use it in my project.
This rusheye has good potential. It would be nice to access it through mvn.
@bartoszmajsak @vinsguru My idea was having API (in Graphene) that would invoke screenshooter and rusheye on demand. Is it something similar to what you are using in your project? Or would like to use? As for the Maven central - currently, I'm having small issues with pushing the artifacts; as soon as it is solved I'll push it into Maven central and let you know.
@MatousJobanek @bartoszmajsak
Check the project here
https://github.com/vinsguru/arquillian-graphene-rusheye
Main page object
@Snap("GooglePage.png")
@Location("https://www.google.com")
public class GooglePage {
@Drone
private WebDriver driver;
@RushEye
private Ocular ocular;
public boolean isAt(){
return driver.getTitle().equals("Google");
}
public void compare(){
System.out.println(ocular.compare());
}
}
Page fragment would be
@Snap("GoogleSearchSuggestions.png")
public class GoogleSearchSuggestions {
@Root
private GrapheneElement root;
@RushEye
private Ocular ocular;
public void compare(){
System.out.println(ocular.element(root).compare());
}
}
Basically the Ocular is responsible for taking the screenshot of the current page/fragment compares against the value in the @Snap - provide the results.
-
If there is no baseline image (possible for the very first time run) - take the screenshot and store it as baseline and Ocular result will be always true in this case.
-
If there is a baseline image, then Ocular compares against the baseline and provides the results
-
I am planning to add features like - % of pixels match. Not to do a very sensitive compare
-
In some cases, we might want to exclude a section before comparing (like date/time fields) TBD.
Ocular.exclude(element).compare()
Hi, sorry for the delay with my response. The dependencies should have been in Maven central already: http://search.maven.org/#search%7Cga%7C1%7Crusheye
The code you have shared looks pretty good. If you wouldn't mind, I think that we could add it into the Graphene project as an additional extension - in the same way as it is done with the screenshooter
project. Then it would be part of the releases. WDYT @vinsguru @bartoszmajsak @lordofthejars
@MatousJobanek , Thanks for doing this.
rusheye is going to be another feather in Arquillian's cap!
I have been using Arquillian's drone and graphene for quite sometime. I would love to contribute to arquillian's projects. Please do what you think best!