Skip to content

Simple Notes app using React/Express/Postgres App to demonstrate different test layers

License

Notifications You must be signed in to change notification settings

helloitsdave/notes-app-full-stack-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notes-app-full-stack-testing

CodeQL

The intention is to build and deploy a very simple app (FE/BE + DB) which can be used to demonstrate tests for each layer using vitest, supertest, react-testing-library and playwright.

Starting point for building the app was the great FreeCodeCamp tutorial Full Stack Project Tutorial – Create A Notes App Using React and Node.js

Refactored the app for testability and added a few additional tweaks.

Deployed app

Playwright e2e Production Tests

  • FE and BE services are deployed using aws free tier on aws
  • Database is deployed using serverless postgres on neon

https://www.noteapp.co.uk

FE Implementation

BE Implementation

  • Node.js
  • Typescript
  • Express
  • Postgres
  • Primsa (DB ORM)

Database

Test Layers

Playwright e2e Production Tests

Executes against the deployed app in real environment

Frontend Service Tests - Playwright

Executes using frontend service running with local backend + db

Frontend Component Tests

Executes against virtual DOM and mocked backend

Backend e2e Tests

Executes api tests against dockerised App and Seeded DB

Backend Integration Tests

Executes tests using mocked dependencies

Backend Contract Tests

Executes against dockerised BE App and Seeded DB

  • Contract tests with pact