---
id: api/cypress-api/spec
title: Cypress.spec
description: Get the properties of the spec under test in Cypress
section: api
source_path: docs/api/cypress-api/spec.mdx
version: e6c8d867c21227247f14714fb5690c7c018983c5
updated_at: '2026-08-08T12:39:37.868Z'
---
# Cypress.spec

`Cypress.spec` returns you the properties of the spec under test.

## Syntax

```
Cypress.spec // returns spec object
```

## Examples

### Log spec information

#### `Cypress.spec` returns an object

```
it('log spec info', () => {  console.log(Cypress.spec)  // {  //   name: 'filter.cy.js',  //   relative: 'cypress/e2e/filter.cy.js',  //   absolute: '/Users/janelane/Dev/web-app/cypress/e2e/filter.cy.js',  // }})
```
