---
id: api/cypress-api/currentretry
title: Cypress.currentRetry | Cypress Documentation
description: Cypress.currentRetry is a number representing the current test retry count.
section: api
source_path: docs/api/cypress-api/currentretry.mdx
version: 6a908a532b1fca4ed18538a4c1c5a9bc7f24f403
updated_at: '2026-05-01T19:25:18.656Z'
---
# Cypress.currentRetry

`Cypress.currentRetry` is a number representing the current [test retry](/llm/markdown/app/guides/test-retries.md) count.

Note that `Cypress.currentRetry` may only be used inside tests and [test hooks](/llm/markdown/app/core-concepts/writing-and-organizing-tests.md#Hooks), and will be `null` outside of tests and test hooks.

## Syntax

```
Cypress.currentRetry
```

## Examples

### Get current test retry

```
it('example', () => {  expect(Cypress.currentRetry).to.eq(0)})
```

## History

| Version | Changes |
| --- | --- |
| [12.3.0](/llm/markdown/app/references/changelog.md#12-3-0) | Added `Cypress.currentRetry` |
