@wdio/browserstack-service 9.40.0 → 9.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,17 @@ export default class BrowserstackLauncherService implements Services.ServiceInst
18
18
  private _percyBestPlatformCaps?;
19
19
  private readonly browserStackConfig;
20
20
  constructor(_options: BrowserstackConfig & BrowserstackOptions, capabilities: Capabilities.TestrunnerCapabilities, _config: Options.Testrunner);
21
+ /**
22
+ * SDK-7075: BROWSERSTACK_PROJECT_NAME / BROWSERSTACK_BUILD_NAME take precedence over the
23
+ * config file, as every other SDK and the binary's own env->config map already do. They are
24
+ * written back into the caps so the session itself carries them: into bstack:options for W3C
25
+ * caps (including one this constructor just created), and into the top-level project/build
26
+ * keys that legacy caps name a build with - added on a BrowserStack session that has no
27
+ * bstack:options, otherwise only overwritten where already present. Blank values are ignored.
28
+ * Returns the values applied, for the Test Reporting fields - none for the caps of a
29
+ * non-BrowserStack session, which are left untouched so the reported names match the session.
30
+ */
31
+ private _applyEnvBuildNames;
21
32
  onWorkerStart(cid: string, caps: WebdriverIO.Capabilities): Promise<void>;
22
33
  onPrepare(config: Options.Testrunner, capabilities: Capabilities.TestrunnerCapabilities | WebdriverIO.Capabilities): Promise<unknown>;
23
34
  onComplete(): Promise<unknown>;
package/build/types.d.ts CHANGED
@@ -38,8 +38,31 @@ export interface TestReportingOptions {
38
38
  user?: string;
39
39
  key?: string;
40
40
  }
41
+ export interface IssueTrackerOptions {
42
+ /**
43
+ * Issue tracker the linked issues live in, e.g. 'jira'.
44
+ */
45
+ name?: string;
46
+ /**
47
+ * Base URL of the issue tracker, e.g. 'https://your-domain.atlassian.net'.
48
+ */
49
+ host?: string;
50
+ [key: string]: unknown;
51
+ }
41
52
  export interface TestManagementOptions {
53
+ /**
54
+ * Test plan to add this run's test cases to.
55
+ */
42
56
  testPlanId?: string;
57
+ /**
58
+ * Issue keys to link to the build, e.g. ['XYZ-1', 'XYZ-2'].
59
+ */
60
+ issues?: string[];
61
+ /**
62
+ * Issue tracker that `issues` belong to.
63
+ */
64
+ issueTracker?: IssueTrackerOptions;
65
+ [key: string]: unknown;
43
66
  }
44
67
  export interface RunSmartSelectionOptions {
45
68
  enabled?: boolean;
@@ -87,8 +110,14 @@ export interface BrowserstackConfig {
87
110
  */
88
111
  testReportingOptions?: TestReportingOptions;
89
112
  /**
90
- * Set the Test Management related config options under this key.
91
- * Currently supports testPlanId.
113
+ * Set the Test Management related config options under this key, e.g. testPlanId, issues
114
+ * and issueTracker.
115
+ *
116
+ * For Mocha and Cucumber runs every key is forwarded to Test Management as is, and the same
117
+ * JSON object can also be passed through the BROWSERSTACK_TEST_MANAGEMENT_OPTIONS environment
118
+ * variable or the --browserstack.testManagementOptions CLI argument; each top-level key is
119
+ * taken from the CLI argument first, then the environment variable, then this option.
120
+ * Other runs use testPlanId only.
92
121
  */
93
122
  testManagementOptions?: TestManagementOptions;
94
123
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browserstack-service",
3
- "version": "9.40.0",
3
+ "version": "9.41.0",
4
4
  "description": "WebdriverIO service for better Browserstack integration",
5
5
  "author": "BrowserStack <support@browserstack.com>",
6
6
  "homepage": "https://github.com/browserstack/wdio-browserstack-service",