---
id: api/cypress-api/testing-type
title: Cypress.testingType | Cypress Documentation
description: Get the current testing type in Cypress.
section: api
source_path: docs/api/cypress-api/testing-type.mdx
version: e6988a974973e9090ce70406c38cb2b9e0eac9fa
updated_at: '2026-05-15T15:50:22.536Z'
---
# Cypress.testingType

`Cypress.testingType` returns the current testing type, determined by your selection in the Cypress Launchpad. The `Cypress.testingType` returns `e2e` for [E2E Testing](/llm/markdown/app/core-concepts/testing-types.md#What-is-E2E-Testing) or `component` for [Component Testing](/llm/markdown/app/core-concepts/testing-types.md#What-is-Component-Testing).

## Syntax

```
Cypress.testingType // returns 'e2e' or 'component'
```

## Examples

### Testing Type

```
it('is running component testing mode', () => {  expect(Cypress.testingType).to.equal('component')})
```

### Conditionals

```
it('does something differently', () => {  if (Cypress.testingType === 'e2e') {    cy.exec('something')  } else {    cy.exec('something else')  }})
```

## History

| Version | Changes |
| --- | --- |
| [7.0.0](/llm/markdown/app/references/changelog.md#7-0-0) | Added `Cypress.testingType` |
