---
id: api/cypress-api/testing-type
title: Cypress.testingType
description: Get the current testing type in Cypress.
section: api
source_path: docs/api/cypress-api/testing-type.mdx
version: 29f95bf8bb06f320986f3749f5bf09a35a409eab
updated_at: '2026-09-04T10:49:54.630Z'
---
# 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.task('something')
  } else {
    cy.task('something else')
  }
})
```

## History

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