UNPKG

@wdio/crossbrowsertesting-service

Version:

A WebdriverIO service that manages local tunnel and job metadata for CrossBrowserTesting users.

67 lines 2.48 kB
import type { Services, Options, Frameworks } from '@wdio/types'; export default class CrossBrowserTestingService implements Services.ServiceInstance { private _config; private _capabilities; private _browser?; private _testCnt; private _failures; private _isServiceEnabled; private _suiteTitle?; private _cbtUsername; private _cbtAuthkey; constructor(_config: Options.Testrunner, _capabilities: WebdriverIO.Capabilities); before(caps: WebdriverIO.Capabilities, specs: string[], browser: WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser): void; /** * Before suite * @param {object} suite Suite */ beforeSuite(suite: Frameworks.Suite): void; /** * Before test * @param {object} test Test */ beforeTest(test: Frameworks.Test): void; afterSuite(suite: Frameworks.Suite): void; /** * After test * @param {object} test Test */ afterTest(test: Frameworks.Test, context: any, results: Frameworks.TestResult): void; /** * For CucumberJS * * Before feature * @param {string} uri * @param {object} feature */ beforeFeature(uri: unknown, feature: { name: string; }): void; /** * * Runs before a Cucumber Scenario. * @param {ITestCaseHookParameter} world world object containing information on pickle and test step * @param {object} result results object containing scenario results * @param {boolean} result.passed true if scenario has passed * @param {string} result.error error stack if scenario failed * @param {number} result.duration duration of scenario in milliseconds */ afterScenario(world: Frameworks.World, result: Frameworks.PickleResult): void; /** * Update info * @return {Promise} Promsie with result of updateJob method call */ after(result?: number): Promise<unknown> | undefined; onReload(oldSessionId: string, newSessionId: string): Promise<unknown> | undefined; updateJob(sessionId: string, failures: number, calledOnReload?: boolean, browserName?: string): Promise<unknown>; /** * * @param {string} sessionId Session id * @returns {String} */ getRestUrl(sessionId: string): string; getBody(failures: number, calledOnReload?: boolean, browserName?: string): { test: any; }; } //# sourceMappingURL=service.d.ts.map