Understanding the Test Editor
The test editor is where you will craft and execute your tests without code. It's the most important part to understanding Magic Inspector. Let's break it down and get you up to speed.
Overview of the Test Editor
- (1) Instructions Panel: This is where you'll find and editor your test instructions.
- (2) The Screen Panel: Here, you'll see screenshots of what the AI is doing in real-time.
- (3) The Logs Panel: This area displays logs of the AI's actions and the video recording of the test. It's great for debugging and understanding the test flow.
The Instructions Editor
As we saw in the quickstart guide, creating instructions is as easy as choosing the right action to perform.
- Use the Plus icon to add a new instruction
And choose the action you want to perform. You've got a variety of actions at your disposal:
- Click element
- Fill input
- AI Visual Assertion
- AI Data Extraction
- And many more!
We'll dive deeper into each action type as we progress through the docs.
Each action comes with its own set of parameters. For instance:
- The "click element" action needs a description of the element to click
- The "fill input" action requires both an element description and the value to fill it with
Some inputs have additional buttons at the end. These will allow you to:
- Adding variables (check out our Variables and Secrets guide for more on this)
- Tweaking AI models (see the Using Vision & DOM AI Models article for a deep dive)
Running your test
Once you're happy with your instructions, it's showtime! Hit that run button and watch your test in action.
Instructions will run one by one and will indicate their status in real-time with undertstable colors.
Resuming a test
When creating a test for a web page, it's common not to know all the necessary instructions in advance. This is where the Resume feature comes in handy, allowing you to build your test step by step.
- Create your first instruction.
- Run your test.
- Add another instruction.
- Click on
Resume
to continue from where you left off.
This iterative process allows you to gradually build and refine your test as you go along.
It's important to note that you have a two-minute window to resume a test. After this period, the worker is released, and you'll need to start the test from the beginning. However, don't worry if you miss this window - starting over isn't a big deal and can sometimes help you catch issues you might have missed before.
This Resume feature is particularly useful when you're exploring a new website or refining your test logic. It allows you to incrementally build your test, ensuring each step works as expected before moving on to the next.
Ready to create some awesome tests? Let's go!