Test Cases
Each Magnitude test case navigates to a URL in a browser, executes Test Steps on the web application at that URL, and verifies any Checks along the way. For example:A test case is designed to represent a single user flow in your web app.
Configure Test Cases
Each test can additionally be configured with a different starting URL (defaults to the configured projecturl in magnitude.config.ts):
Test Steps
When you define a step, you provide a description for what Magnitude should do during that step, for example:Checks
A check is a natural language visual assertion that you can add to any step in your test case.Think
assert in other testing frameworks, except it can “see” the website and understand natural language descriptions.- “Only 3 todos should be listed”
- “Make sure image of giraffe is visible”
- “The response from the chat bot should make sense and answer the user’s question”
Checks are validated after the step they are attached to is executed.
Test Data
You can provide additional test data relevant to specific step like this:The key/value pairs are completely up to you, but it should be clear enough what they should be used for.
Custom LLM prompting
You can pass custom instructions to anyact call by specifing the prompt option.