import BaseModule from './baseModule.js'; import { BStackLogger } from '../cliLogger.js'; import type { Options } from '@wdio/types'; export default class AutomateModule extends BaseModule { logger: typeof BStackLogger; browserStackConfig: Options.Testrunner; private serviceOptions; private sessionMap; static readonly MODULE_NAME = "AutomateModule"; /** * Create a new AutomateModule */ constructor(browserStackConfig: Options.Testrunner, serviceOptions?: Record); getModuleName(): string; onBeforeTest(args: Record): Promise; onAfterTest(args: Record): Promise; /** * A `BeforeAll` / `AfterAll` failure produces no scenario result, so it can never enter the * per-test `testResults` map that onAfterExecute aggregates — a run whose BeforeAll blew up * reports its session as PASSED. Legacy pushed the hook error into `_failReasons` and * `after()` marked the session failed; that whole accumulation is gated * `setSessionStatus && !BrowserstackCLI.isRunning()`, so it is dead while the binary is up. * * Cucumber-gated deliberately. `wdio_mocha` has the identical latent shape on this flow, but * legacy mocha behaved the same way, so repairing it here would be an unrequested behaviour * change to the one framework already working on the CLI flow. */ onBuildLevelHookEnd(hookKey: string, args: Record): Promise; private isCucumberInstance; /** The hook's reported name (`BEFORE_ALL for `), so the session reason names the hook. */ private resolveHookName; onAfterExecute(): Promise; markSessionName(sessionId: string, sessionName: string, config: { user: string; key: string; }): Promise; markSessionStatus(sessionId: string, sessionStatus: 'passed' | 'failed', sessionErrorMessage: string | undefined, config: { user: string; key: string; }): Promise; } //# sourceMappingURL=automateModule.d.ts.map