Skip to main content
@quiesco/cucumber runs Gherkin features with cucumber-js. Steps reach the app through this.app. It needs @cucumber/cucumber 12 or later.

Setup

quiesco init --runner cucumber installs @quiesco/cucumber and @cucumber/cucumber, and writes: It also adds "allowImportingTsExtensions": true to tsconfig.json, because step files import each other with .ts (see TypeScript).
Features are read from features/**/*.feature, cucumber-js’s default. Do not set paths here: paths from the config are merged with the ones on the command line, so quiesco test features/x.feature would run every feature.

registerQuiesco()

Types: RegisterOptions · Lifecycle import '@quiesco/cucumber/register' registers everything with the defaults. To change them, call registerQuiesco() in the support file instead (not both):
class extending QuiescoWorld
default:"QuiescoWorld"
Your own World (see below).
number
default:"60000"
The default timeout of a step. Each Driver call has its own sync timeout; this caps the whole step.
number
default:"600000"
Timeout of the BeforeAll hook that starts the session. Booting an emulator can take minutes.
number
default:"180000"
Timeout of the reset before each scenario. It can start the app again when it is gone, which waits up to three times the connect timeout.
It registers four hooks:

The World

QuiescoWorld gives every step:
  • this.app: the Driver.
  • this.platform: 'ios', 'android' or 'web', for a step that does the same thing differently per platform. Scenarios for one platform only are better tagged (@ios, …).
  • this.session: the session, for what the Driver does not cover.
To add your own business driver, extend it and pass it as world:
More in the driver pattern. Ready-made generic steps for prototyping are in generic steps.

TypeScript

Step and support files run with Node’s type stripping, not tsc:
  • Relative imports name the .ts file: import { TodoDriver } from './todo-driver.ts'.
  • TypeScript syntax that generates code is not supported: parameter properties (constructor(private app: Driver)), enum, namespace. Declare fields instead.

Tags

Platform and browser tags go on the feature, a Rule, the scenario or an Examples block; the innermost one decides (scenario tags). @hard-reset relaunches the app before that scenario.

Running

quiesco test sets QUIESCO_PLATFORM, runs cucumber-js and adds Quiesco’s progress formatter by itself; other arguments go to cucumber-js, e.g. --tags @smoke or a feature file (quiesco test). --workers N becomes --parallel N: N worker threads, each with a session and a device of its own (parallel runs).