Skip to main content

Installation

Prerequisites

  • Node.js 20 or later
  • An existing project directory

Run the installer

npx letsrunit init

init is interactive: it walks you through each step and asks before making changes. It's safe to re-run at any time.

What does the installer do?

1

Install the CLI

@letsrunit/cli is added to your project's dev dependencies. It provides the letsrunit binary for explore, generate, and run.

2

Install Cucumber

letsrunit uses Cucumber.js as the test runner. If it's not already installed, the wizard will offer to add @cucumber/cucumber to your dev dependencies. It also creates two files: cucumber.js tells Cucumber where your app is running:

export default {
worldParameters: {
baseURL: 'http://localhost:3000',
},
};

features/support/world.js loads the letsrunit step library:

import { setDefaultTimeout } from '@cucumber/cucumber';
import '@letsrunit/cucumber';

setDefaultTimeout(30_000);
3

Create the features directory

If your project has no .feature files yet, init creates features/example.feature with a minimal scenario to verify the setup works:

Feature: Example
Scenario: Homepage loads
Given I'm on the homepage
4

Install Playwright browsers

letsrunit drives a real Chromium browser. If Playwright's Chromium binary isn't found, the wizard offers to install it:

npx playwright install chromium
5

Add a GitHub Action (optional)

The final step offers to scaffold a .github/workflows/letsrunit.yml that runs your features on every push and pull request. See CI/CD for the full workflow.

info

Run npx letsrunit init again at any time to add steps you skipped the first time.