Lost Pixel

Lost Pixel Platform

Setting up Lost Pixel Platform - managed version of Lost Pixel
Lost Pixel Platform offers a managed service with a user-friendly interface for a more efficient visual regression testing workflow.
The platform version provides additional features, such as collaboration tools, automated test runs, and detailed reporting. By upgrading to the Lost Pixel Platform, you can streamline your visual regression testing process, improve collaboration with your team, and gain access to valuable insights and analytics.
Lost Pixel Platform has first class integration with GitHub & GitHub Actions but can be set up with any CI provider given it runs on GitHub
We need to create lost-pixel.config.js|ts file that will run the whole setup. We will use the example of lost-pixel.com as it is set up on our own platform 😊
import { CustomProjectConfig } from 'lost-pixel';
export const config: CustomProjectConfig = {
pageShots: {
pages: [
{ path: '/', name: 'landing' },
path: '/blog',
name: 'blog',
baseUrl: '',
lostPixelProjectId: 'we_will_paste_id_here_later',
apiKey: process.env.LOST_PIXEL_API_KEY,
Next up GitHub action declaration file that lives in `.github/workflows`. We are building & serving our Next.js application & run lost pixel on it's pages(defined in above file):
on: [push, pull_request]
runs-on: ubuntu-latest
name: Lost Pixel
- name: Checkout
uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-[email protected]
node-version: 16.x
- name: Instal pnpm
uses: pnpm/action-[email protected]
version: 7.17.1
- name: Install dependencies
run: pnpm install
- name: Build next
run: pnpm run build
- name: Start next
run: pnpm run start &
- name: Lost Pixel
uses: lost-pixel/lost-[email protected]

Set up Lost Pixel platform

Visit Lost Pixel installation page and install Lost Pixel App on organisations & repositories you want to have visual tests on
Sign in using GitHub into app.lost-pixel.com, switch to correct organisation & select which repositories selected in previous step should be visible on Lost Pixel Platform:
From onboarding screen copy your project id and replace it in the lost-pixel.config.ts created in the first step
lostPixelProjectId: 'clcuk66iz005wp41h3cauveb2',
Copy the Lost Pixel api key, we will need to do the final step to provide it as a GitHub Action secret

Set Lost Pixel api key on GitHub

Setting LOST_PIXEL_API_KEY as Action Secret

Your visual regression testing workflow is done 🎊

Now all of new pushes to your repository are triggering visual tests that you can conveniently manage yourself or collaboratively with your team!
lost-pixel.com visual test managed on Lost Pixel Platform