---
id: api/cypress-api/currentretry
title: Cypress.currentRetry
description: Cypress.currentRetry is a number representing the current test retry count.
section: api
source_path: docs/api/cypress-api/currentretry.mdx
version: fbc9225067c51c52ee13224e3b702cf8a025ec12
updated_at: '2026-08-14T12:36:26.878Z'
---
# 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` |
