News for hackers. Stuff that matters.
Re:Show HN: Instantly create a GitHub repository to take scr... by lloydatkinson on Monday March 14, 2022 @07:11PM (#30679758)
This but automated visual regression testing (eg testing screenshots are the same) would be amazing. Anyone got any ideas how this might work with shot-scraper?
Re:Show HN: Instantly create a GitHub repository to take scr... by simonw on Monday March 14, 2022 @07:26PM (#30679885)
You could absolutely get this working with GitHub Actions with a bit of creativity.

I've been playing around with my own image-diff tool for this kind of thing, but it's not yet in a decent state: https://github.com/simonw/image-diff - there are other, better options out there such as https://github.com/mapbox/pixelmatch

Needle is an older system that did this using Selenium - updating that to work with Playwright (or Playwight via shot-scraper) would be an interesting project: https://github.com/python-needle/needle

Re:Show HN: Instantly create a GitHub repository to take scr... by trevinhofmann on Monday March 14, 2022 @08:01PM (#30680106)
I used pixelmatch + puppeteer at a previous job to automate this. The service would screenshot each page on the master branch and the PR branch, then comment on the PR with a link showing the Before, Diff, and After of each page that changed. I highly recommend this type of setup.
Re:Show HN: Instantly create a GitHub repository to take scr... by lloydatkinson on Tuesday March 15, 2022 @04:14AM (#30682809)
Where did you upload the screenshots?
Re:Show HN: Instantly create a GitHub repository to take scr... by trevinhofmann on Tuesday March 15, 2022 @05:30AM (#30683288)
The same service kept the screenshots in its file system, and served them along with with the web pages that displayed them.
Re:Show HN: Instantly create a GitHub repository to take scr... by simonw on Monday March 14, 2022 @09:04PM (#30680606)
I love that idea.
Re:Show HN: Instantly create a GitHub repository to take scr... by westurner on Monday March 14, 2022 @11:00PM (#30681242)
Awesome Visual Regression Testing > lists quite a few tools and online services: https://github.com/mojoaxel/awesome-regression-testing#tools...

"visual-regression": https://github.com/topics/visual-regression

Cypress.io can run in a CI job, does Time Travel, works with DevTools debugger, can take screenshots and [headless] video, and it looks like there's a visual regression testing thing for it: https://github.com/mjhea0/cypress-visual-regression https://docs.cypress.io/guides/overview/why-cypress#Features

Re:Show HN: Instantly create a GitHub repository to take scr... by dewski on Monday March 14, 2022 @09:44PM (#30680859)
I’ve built something like this and stored the diff regions in PostGIS, really easy way to build a visual diff search tool using bounding boxes.
Re:Show HN: Instantly create a GitHub repository to take scr... by simonw on Monday March 14, 2022 @11:27PM (#30681373)
Now you've got me thinking if that would be possible using SpatiaLite.