Vercel guide for test automation
Answered
Mugimaki Flycatcher posted this in #help-forum
Mugimaki FlycatcherOP
https://vercel.com/guides/how-can-i-run-end-to-end-tests-after-my-vercel-preview-deployment
Hey, this guide doesn't cover logging in to vercel for deploy preview. Has anyone ever stumble upon this? How did you work around it?
Github Action that I am using
Uploading a screenshot example so it's easier to understand.
Hey, this guide doesn't cover logging in to vercel for deploy preview. Has anyone ever stumble upon this? How did you work around it?
Github Action that I am using
name: Playwright Tests
on:
deployment_status:
jobs:
e2e-testing:
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright e2e tests
run: npx playwright test
env:
BASE_URL: ${{ github.event.deployment_status.environment_url }}
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30Uploading a screenshot example so it's easier to understand.
2 Replies
Mugimaki FlycatcherOP
Answer
Mugimaki FlycatcherOP
Rushed with the question 😄