---
id: api/cypress-api/spec
title: Cypress.spec | Cypress Documentation
description: Get the properties of the spec under test in Cypress
section: api
source_path: docs/api/cypress-api/spec.mdx
version: 24a73f8a97175663aaffd3b016289fb2a523a4ea
updated_at: '2026-05-14T20:17:33.301Z'
---
# 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',  // }})
```
