Customize browser settings, web servers, and more
npx magnitude init
, a magnitude.config.ts
will be generated for you. By default it looks something like:
url
is the default URL that all test cases will use if not specified.
However, there’s a lot more you can customize to get Magnitude working exactly as you want.
viewport
or even recordVideo
to capture videos of tests. For example:
webServer
with the command to start the server and the URL it will listen on:
webServer.url
is already reachable. If so and reuseExistingServer
is true
, the command is skipped. The server process is killed automatically once the test run completes.
--no-fail-fast
CLI flagcontinueAfterFailure: true
to your magnitude.config.ts
MAGNITUDE_TEST_URL
)magnitude.config.ts
)url
option at any of these levels, you can provide a relative path to attach to the upper level’s URL, or a full URL to override it.
For example, if you provide {url: "https://localhost:8080"}
in magnitude.config.ts
, and an individual test has {url: "/items?id=1"}
, the test runner will navigate to https://localhost:8080/items?id=1
.