Test the Web enables anyone to quickly test common browser interactions on the web with mock interfaces.
Test the Web is a "pattern library". The primary goal of the project is to capture various patterns (both good and bad) in a working state so as to facilitate testing and developing experiences that interact with those patterns.
With the aforementioned goals and intent in mind, patterns should:
- Represent real-world cases, avoiding theoretical or manufactured scenarios.
- Be represented in the abstract, not referencing site/app-specific code
- Not capture concerns beyond the described patterns (e.g. unused class names, code for experiences not included, etc.).
- Avoid alterations to previously published patterns which will change the core functionality of the pattern (instead prefer creating new patterns with the modifications desired).
- Not create or alter patterns for the sake of passing tests or resolving broken functionality of external systems (e.g. BIT).
- Treat all data used in patterns as ephemeral, avoiding storage unless required and described by the represented pattern.
- While the project aspires to capture all common patterns of the web, this is largely expected to be unachievable in whole, given the size and ever-changing nature of the web.
- Because the project is presently leveraging docusaurus, complex or case-specific patterns can sometimes be difficult to replicate precisely.
- clone the repo to your desired environment
- build and run with Node/npm:
npm ci && npm run build:watch
- go to
http://localhost
- start testing!
Optionally, you can override some configurations by creating a dotfile named .env
in the /api
directory (see .env.example
for details). All the other usual configuration options around Node.js, Docker, Express, Docusaurus, etc. apply.
The express server will attempt to find and use provided cert and key files (by default, named ssl.crt
and ssl.key
respectively) located in the /api
directory. If it cannot find any, it will run the HTTP server only (still allowing for easy placement behind an SSL proxy if desired).