# Writing Testcases

This section explains how to write stable, context-aware, and execution-ready test cases using the Drizz Desktop App. Drizz follows an intent-driven authoring workflow where users write commands sequentially based on what is visible on the device screen. Each line represents a single user action or validation, allowing the flow to be authored naturally, one screen at a time. You can write commands, test interactions in real time using continuous mode, adjust parameters, insert validations, and refine steps based on execution logs. This ensures that test cases are accurate, deterministic, and aligned with user expectations before they are saved into the project.

### Writing a Testcase

1. Navigate to the application under test.
2. Write commands sequentially based on the current screen.
3. Each command represents a single user intent or action.
4. Commands are added in order as the flow progresses screen by screen.
5. Review and adjust commands to match the expected behavior.
6. Save the test once the flow is complete.

### Editing

The editor allows:

1. Editing commands
2. Reordering commands
3. Editing parameters
4. Adding waits
5. Adding validations<br>

### Saving/Updating

1. Save the test by tapping on the save as button (1st time saving)
2. Update the test by tapping on the Update button


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.drizz.dev/getting-started/drizz-desktop-app/drizz-desktop-app-setup/writing-testcases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
