@wdio/browserstack-service
Version:
WebdriverIO service for better Browserstack integration
101 lines • 2.77 kB
TypeScript
import type { Options } from '@wdio/types';
type SmartSelectionRepoInfo = {
url?: string;
featureBranch?: string;
baseBranch?: string;
name?: string;
[key: string]: unknown;
};
type SmartSelectionSource = string[] | SmartSelectionRepoInfo[] | null;
/**
* Utility class for test orchestration
*/
type OrchestrationConfig = Options.Testrunner | Record<string, unknown>;
export declare class OrchestrationUtils {
private static _instance;
private runSmartSelection;
private smartSelectionMode;
private testOrdering;
private smartSelectionSource;
private projectName?;
private buildName?;
private buildIdentifier?;
/**
* @param config Configuration object
*/
constructor(config: OrchestrationConfig);
/**
* Extract build details from capabilities
*/
private _extractBuildDetails;
private _parseCapability;
/**
* Get or create an instance of OrchestrationUtils
*/
static getInstance(config?: OrchestrationConfig): OrchestrationUtils | null;
/**
* Get orchestration data from config
*/
static getOrchestrationData(config: OrchestrationConfig): Record<string, unknown>;
/**
* Get run smart selection setting
*/
getRunSmartSelection(): boolean;
/**
* Get smart selection mode
*/
getSmartSelectionMode(): string;
/**
* Get smart selection source
*/
getSmartSelectionSource(): SmartSelectionSource;
/**
* Get project name
*/
getProjectName(): string | undefined;
/**
* Get build name
*/
getBuildName(): string | undefined;
/**
* Get build identifier
*/
getBuildIdentifier(): string | undefined;
/**
* Set build details
*/
setBuildDetails(projectName?: string, buildName?: string, buildIdentifier?: string): void;
/**
* Set run smart selection
*/
private _setRunSmartSelection;
/**
* Parse JSON source configuration file and format it for smart selection.
*
* @param filePath - Path to the JSON configuration file
* @returns Formatted list of repository configurations
*/
private _loadSourceFromFile;
/**
* Set test ordering based on priorities
*/
private _setTestOrdering;
/**
* Check if test ordering is enabled
*/
testOrderingEnabled(): boolean;
/**
* Get test ordering name
*/
getTestOrderingName(): string | null;
/**
* Get test orchestration metadata
*/
getTestOrchestrationMetadata(): Record<string, unknown>;
/**
* Get build start data
*/
getBuildStartData(): Record<string, unknown>;
}
export default OrchestrationUtils;
//# sourceMappingURL=testorcherstrationutils.d.ts.map