Skip to content

Conversation

@AakashHotchandani
Copy link
Owner

Proposed changes

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

//: # (The current main branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against the v8 branch.)

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

Reviewers: @webdriverio/project-committers

```

You can explore all the features of Test Observability in [this sandbox](https://observability-demo.browserstack.com/) or read more about it [here](https://www.browserstack.com/docs/test-observability/overview/what-is-test-observability).
You can explore all the features of Test Reporting and Analytics in [this sandbox](https://automation.browserstack.com/) or read more about it [here](https://www.browserstack.com/docs/test-observability/overview/what-is-test-observability).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (this._options.testReporting === undefined && this._options.testObservability !== undefined) {
this._options.testReporting = this._options.testObservability
} else if (this._options.testReporting !== undefined && this._options.testObservability === undefined) {
this._options.testObservability = this._options.testReporting

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for managing 2 options here?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to support both, testObservability and testReporting flag, and options come with the flag name they are using.
I am assuming customers won't know about testReportingOptions if they are using testObservability flag so they will use testObservabilityOptions and we have to add backward compatibility for the old flag.

* @deprecated Use testReporting instead
*/
testObservability?: boolean;
testObservability?: boolean | { enabled: boolean };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is | { enabled: boolean } added here?

return process.env.BROWSERSTACK_TEST_REPORTING === 'true'
}
if (process.env.BROWSERSTACK_OBSERVABILITY !== undefined) {
return process.env.BROWSERSTACK_OBSERVABILITY === 'true'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to manitain 2 different vars?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes requirement of story is both should work

if (typeof options.testObservability === 'object' && options.testObservability !== null) {
return options.testObservability.enabled || false
}
return Boolean(options.testObservability)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for not maintaining it in single var ultimately

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we get vars from config itself thats how we consume from user, hence used two vars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants