---
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: 24a73f8a97175663aaffd3b016289fb2a523a4ea
updated_at: '2026-05-14T20:17:33.301Z'
---
# 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` |
