sauce_bindings
sauce_bindings copied to clipboard
Java visual
This is a PR against #275, and it'll stay in Draft until that one is merged. It subsumes #259
I finally really like this API!
Easiest to see what this does from the examples:
Using default: https://github.com/saucelabs/sauce_bindings/blob/11d774517a0b2c293c1c2c28939aa36375d1eeaa/java/main/src/test/java/com/saucelabs/saucebindings/examples/VisualTest.java#L12-L26
Updating Options: https://github.com/saucelabs/sauce_bindings/blob/11d774517a0b2c293c1c2c28939aa36375d1eeaa/java/main/src/test/java/com/saucelabs/saucebindings/examples/VisualOptionsTest.java#L14-L39
Cool things this does:
- Automatically populates the default branch name with the actual branch name if it can determine it
- Automatically populates the Sauce Labs job with pass/fail based on whether Visual tests pass/fail
- Useful error when attempting to send a visual command after getting results (i.e., calling "end")
I still need to add javadocs because that's important and stuff
It is a good practice to document public methods in user-facing libs, not sure how much this principle applies to this framework
Thanks @mykola-mokhnach ! Yes, this definitely needs the javadocs updated before it can be released. That's just never the fun part. :)
And looks like there are Snapshot options that I'm not supporting yet — https://docs.saucelabs.com/visual/e2e-testing/commands-options/#arguments-1
Inadvertently closed because I deleted the merged branch that this was PR'd against. Trying to fix now.