UNPKG

@serenity-js/cucumber

Version:

Serenity/JS test runner adapter for seamless integration with any version of Cucumber.js, facilitating BDD-style test automation and leveraging Serenity/JS reporting capabilities

54 lines 1.95 kB
import type { TestRunnerAdapter } from '@serenity-js/core/lib/adapter'; import type { FileSystem, ModuleLoader } from '@serenity-js/core/lib/io'; import type { Outcome } from '@serenity-js/core/lib/model'; import type { CucumberConfig } from './CucumberConfig'; import type { SerenityFormatterOutput } from './output'; /** * Allows for programmatic execution of Cucumber test scenarios. * * ## Learn more * - [`TestRunnerAdapter`](https://serenity-js.org/api/core-adapter/interface/TestRunnerAdapter/) * * @group Integration */ export declare class CucumberCLIAdapter implements TestRunnerAdapter { private readonly loader; private readonly output; private pathsToScenarios; private readonly options; constructor(config: CucumberConfig, loader: ModuleLoader, fileSystem: FileSystem, output: SerenityFormatterOutput); /** * Scenario success threshold for this test runner, calculated based on [`CucumberConfig`](https://serenity-js.org/api/cucumber-adapter/interface/CucumberConfig/) */ successThreshold(): Outcome | { Code: number; }; /** * Loads feature files. * * @param pathsToScenarios * Absolute or relative paths to feature files */ load(pathsToScenarios: string[]): Promise<void>; /** * Returns the number of loaded scenarios * * @throws [`LogicError`](https://serenity-js.org/api/core/class/LogicError/) * If called before `load` */ scenarioCount(): number; /** * Instructs Cucumber to execute feature files located at `pathsToScenarios` */ run(): Promise<void>; private runScenarios; private runWithCucumber10; private runWithCucumber8JavaScriptApi; private runWithCucumberApi; private runWithCucumber8; private runWithCucumber7; private runWithCucumber3to6; private runWithCucumber2; private runWithCucumber0to1; } //# sourceMappingURL=CucumberCLIAdapter.d.ts.map