# Writing Properties

With fuzzing you can automatically test properties (also called property-based testing). So, you'll first need to write some properties.

Diligence Fuzzing supports multiple property formats, but our preferred option is Scribble.

## Scribble

Scribble is a specification language for smart contracts where you write properties as annotations in your code. These annotations can be translated into runtime checks that trigger whenever a specified property is violated. This way Diligence Fuzzing can tell you exactly which property was violated.

**Example Scribble property:**

```
// #if_succeeds balance(_to) == old(balance(_to)) + amount;
function transfer(address _to, uint amount) public { ... }
```

{% hint style="success" %}
Learn more about Scribble over at [docs.scribble.codes](https://docs.scribble.codes).
{% endhint %}

## Other formats

### Assertions

We don't just find property violations of Scribble properties, but we also detect regular assertion failures.

### Property-Based Testing&#x20;

We realise that you might already have test-cases for property-based testing tools. For this reason we've implemented a utility which converts such tests to Scribble-annotations!


---

# 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://fuzzing-docs.diligence.tools/getting-started-1/writing-properties.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.
