Skip to content

Setting up End-To-End Testing - #7

Merged
dineshUmasankar merged 17 commits into
masterfrom
e2e-tests-setup
Sep 30, 2023
Merged

dineshUmasankar merged 17 commits into
masterfrom
e2e-tests-setup

Conversation

@dineshUmasankar

Copy link
Copy Markdown
Contributor

Description

  • Setup Playwright for Automated Browser End-To-End Testing to run on every branch's preview deployment
  • Will run end-to-end testing on the following browsers: Safari, Chrome, Firefox, Microsoft Edge, Chrome (Mobile), Safari (Mobile)

Test Guidelines

  • Clone Repository and Checkout Branch
  • Install new dependencies: npm i
  • Setup playwright dependencies: npx playwright install --with-deps
  • Install Microsoft Edge playwright dependency: npx playwright install msedge
  • Run playwright tests: npx playwright test

dineshUmasankar and others added 17 commits September 20, 2023 14:02
- Testing via containers to run Playwright Tests
- Changed install dependencies step to use pnpm actions
- Attempt to fix missing msedge
- Change all npm commands to execute via pnpm
- On Deploy (Preview and Production), Run Playwright E2E Tests
- Modify Push/Pull to run Playwright E2E Tests only on main/master
- Changed Job Names under each playwright testing environment
- added Deployment URL via env variable in URL attribute of playwright config
…review Deployments

- Due to the nature of Vercel Preview, it creates preview deployments for all
branches associated to the project. As such, the E2E tests run on all branches for which
Vercel releases a deployment for (including preview) which applies to every branch.

- We will get stability coverage across all branches on all pushes across the project.
As such, it is not necessary to build and execute a web server on a container to E2E
test again. As the build and execute process is automatically tested and reported by
Vercel.
- Running into an issue where WebServer causes issues on workflow run
after deployment with "reuseExistingServer" & URL / Port Already active

- Decided to change local E2E Testing policy to run `pnpm run dev` on a
separate terminal & run pnpm exec playwright test on a separate terminal
@dineshUmasankar dineshUmasankar added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 27, 2023
@dineshUmasankar dineshUmasankar self-assigned this Sep 27, 2023
@vercel

vercel Bot commented Sep 27, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hackathon-web ✅ Ready (Inspect) Visit Preview Sep 27, 2023 9:43pm

@joycebuhano joycebuhano left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

N/A

@dineshUmasankar
dineshUmasankar merged commit e0a73ac into master Sep 30, 2023
@dineshUmasankar
dineshUmasankar deleted the e2e-tests-setup branch September 30, 2023 14:37

This branch was successfully deployed

1 active deployment
Preview — 792051ef Deployed Sep 23, 2023 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants