This application is used to test testium itself. Changes to this application should be done carefully. If additional behavior is required, it might be better to add a new file or endpoint than to change an existing one.
- Start on default port (4003):
npm start
- Start on any port (e.g. 8080):
PORT=8080 npm start
Sends a JSON response with information about the incoming request:
{
ip, // remote address/ip of the sender
method, // the http method, e.g. 'GET'
url, // the request url path, e.g. '/echo?a=42'
body, // the request body for POST etc.
headers, // the request headers
}
Sends a minimal error page with status code 500.
Resets the connection without sending a valid response. Simulates the app crashing.
Never sends a response and keeps the connection open indefinitely. Useful for testing timeout behavior, making sure the test suite can recover.
Simulates a resource required by the page (a script tag) never fully loading, preventing the page load from finishing.
Simulates a page that delays displaying and hiding certain elements, e.g. because it's waiting for additional data to load.
div.load_later
: Shows after 300msdiv.load_never
: Is and stays hiddendiv.hide_later
: Gets hidden after 300msdiv.hide_never
: Is and stays visible
A relatively complex page:
- Multiple
div.message
elements to verify uniqueness constraints for selectors - Exactly one
div.only
to have a unique element to select a.link-to-other-page
linking to/other-page.html
- A form with various input elements
- A button that triggers log messages
- Different alerts, triggered by links
Looks just like /index.html
, just with slightly different content at the bottom.
Can be used to test visual diffing.
A mostly empty page that is linked to by /index.html
.
Uses a meta
tag to redirect to /index.html
after a few ms.
Just like /redirect-after.html
but additionally passes two query params:
a b
:A B
- to test encoding of spacesc
:1,7
- to test url encoding of special characters
For testing popup & iframe related features.
Displayed as iframe#cool-frame
and contains div.in-iframe-only
and iframe#nested-frame
(see /nested-frame.html
).
This page contains div#nested-frame-div
.
Can be opened by clicking on button#open-popup
and contains div.popup-only
.
Displays a draggable element for testing buttonDown/Up and movePointer...
Displays an installable minimal PWA testing page (it passes lighthouse audit with a score of 100)