> For the complete documentation index, see [llms.txt](https://ultimatewebsolutions.gitbook.io/qa-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ultimatewebsolutions.gitbook.io/qa-knowledge-base/test-automation/annotations.md).

# Annotations

"Annotations" usually means **special markers/decorators that tell the test framework how a test should behave**.

### Example

`@pytest.mark`

```python
@pytest.mark.smoke
def test_login(page):
    ...
```

Then you can run only smoke tests: `pytest -m smoke`

***

`@pytest.mark.xfail`

**Means**: I expect this test to fail.

For example, if there is a known bug:

```python
@pytest.mark.xfail(reason="Known bug BUG-123")
def test_payment(page):    
    ...
```

This is useful when you know the functionality currently doesn't work but don't want the test failure to be treated as an unexpected failure.
