@get-skipper/cypress
v1.0.1
Published
Skipper plugin for Cypress — enable/disable tests from a Google Spreadsheet
Maintainers
Readme
@get-skipper/cypress
Skipper plugin for Cypress — enable/disable tests from a Google Spreadsheet.
Installation
pnpm add -D @get-skipper/cypress
# or
npm install --save-dev @get-skipper/cypressSetup
1. Configure cypress.config.ts
import { defineConfig } from 'cypress';
import { createSkipperPlugin } from '@get-skipper/cypress';
const skipperConfig = {
spreadsheetId: process.env.SKIPPER_SPREADSHEET_ID!,
credentials: { credentialsBase64: process.env.GOOGLE_CREDS_B64! },
// Or for local dev:
// credentials: { credentialsFile: './service-account.json' },
};
export default defineConfig({
e2e: {
setupNodeEvents: createSkipperPlugin(skipperConfig),
// ... rest of your config
},
});2. Add the support file
Option A — import in your existing support file (cypress/support/e2e.ts):
import '@get-skipper/cypress/support';Option B — set as the support file in cypress.config.ts:
import { supportFile } from '@get-skipper/cypress';
export default defineConfig({
e2e: {
supportFile: supportFile,
setupNodeEvents: createSkipperPlugin(skipperConfig),
},
});No changes to test files are required. Tests with a future disabledUntil date are automatically skipped via beforeEach.
Test ID Format
{relative spec file path} > {describe block(s)} > {test name}Example:
cypress/e2e/auth/login.cy.ts > login > should log in with valid credentialsOptions
| Option | Default | Description |
|---|---|---|
| sheetName | first tab | Sheet tab to read/write |
| referenceSheets | [] | Additional tabs to read (read-only) |
| testIdColumn | "testId" | Column header for the test ID |
| disabledUntilColumn | "disabledUntil" | Column header for the disable date |
See the root README for the full configuration reference.
Modes
read-only(default): reads the spreadsheet, skips disabled tests. No writes.sync(SKIPPER_MODE=sync): same as read-only + reconciles the spreadsheet after the run.
See the root README for full setup instructions.
License
MIT
