---
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: ce02913654e2655ee63448bdc92bb92c7b46a619
updated_at: '2026-04-22T19:37:51.587Z'
---
# Cypress.spec

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

## Syntax

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

## Examples

### Log spec information

#### Cypress.spec returns an object

```js
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',
  // }
})
```
