Implementation:Cypress io Cypress OpenModule Start
Appearance
| Knowledge Sources | |
|---|---|
| Domains | CLI, Process_Management |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Concrete tool for launching the Cypress interactive test runner provided by the CLI open module.
Description
The openModule.start function processes CLI options and spawns the Cypress binary as a child process in interactive (open) mode. It first verifies the binary installation, then maps user options to server arguments via processOpenOptions, and finally invokes spawn.start to launch the Electron application.
Usage
This function is called when a user runs cypress open from the command line or invokes it programmatically via the Cypress module API.
Code Reference
Source Location
- Repository: cypress-io/cypress
- File: cli/lib/exec/open.ts
- Lines: L81-106
Signature
const start = async (options: any = {}): Promise<any> => {
// options.dev: boolean - run in development mode
// options.detached: boolean - detach the spawned process
// options.project: string - project directory path
// options.browser: string - preferred browser
// options.testingType: string - 'e2e' or 'component'
// options.config: string - inline config overrides
// Calls processOpenOptions(options) to map to server args
// Calls spawn.start(args, { dev, detached }) to launch binary
}
Import
import openModule from '../exec/open'
// Usage: await openModule.start(options)
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| options | object | No | Open command options |
| options.project | string | No | Project directory path |
| options.browser | string | No | Browser name or path |
| options.testingType | string | No | 'e2e' or 'component' |
| options.config | string | No | Inline config overrides |
| options.dev | boolean | No | Development mode flag |
| options.detached | boolean | No | Detach spawned process |
Outputs
| Name | Type | Description |
|---|---|---|
| Child process | Promise<any> | Resolves when the Cypress Electron app is launched |
| Interactive UI | Electron window | Launchpad UI for project setup and test selection |
Usage Examples
CLI Usage
# Open interactive mode
npx cypress open
# Open with specific project
npx cypress open --project ./my-app
# Open with specific browser
npx cypress open --browser chrome
# Open in component testing mode
npx cypress open --component
Programmatic Usage
const cypress = require('cypress')
cypress.open({
project: './my-app',
browser: 'chrome',
testingType: 'e2e',
})
Related Pages
Implements Principle
Requires Environment
- Environment:Cypress_io_Cypress_Browser_Requirements
- Environment:Cypress_io_Cypress_Linux_Display_Server
Uses Heuristic
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment