Skip to main content

Running Tests

Cucumber

Cucumber is the primary way to run your test suite. It picks up all .feature files, reads configuration from cucumber.js, and reports results across all scenarios.

npx cucumber-js

Configuration

cucumber.js at the project root configures the test run:

export default {
timeout: 30_000,
worldParameters: {
baseURL: 'http://localhost:3000',
},
};
OptionDescription
worldParameters.baseURLBase URL for relative paths in Given I'm on page steps
timeoutStep timeout in milliseconds. Default is 5000; browser steps typically need at least 15000.

Running specific files or tags

Run a single feature file:

npx cucumber-js features/login.feature

Run scenarios with a specific tag:

npx cucumber-js --tags @smoke

Tag scenarios in your feature files:

@smoke
Scenario: User logs in
Given I'm on page "/login"
...

letsrunit run

warning

letsrunit run is intended for testing letsrunit itself, not for running your test suite. Use Cucumber for that.

letsrunit run executes a single .feature file directly against a URL, without Cucumber configuration.

letsrunit run <url> <feature>