Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#323] Improvement: Enable passing credentials for Browserstack via environmental variables for better use in CI/CD #324

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

oomelianchuk
Copy link
Contributor

Enabled reading of BROWSERSTACK_USERNAME and BROWSERSTACK_PASSWORD properties in case no value for test environment credentials were found in properties

@oomelianchuk oomelianchuk self-assigned this Dec 13, 2024
@oomelianchuk oomelianchuk changed the base branch from master to develop December 13, 2024 09:45
@oomelianchuk oomelianchuk force-pushed the #323-improvement-enable-passing-credentials-for-browserstack-via-environmental-variables-for-better-use-in-cicd branch from ec45748 to d638ef6 Compare December 13, 2024 09:50
@@ -404,7 +404,7 @@ else if (safariBrowsers.contains(browserName))
config.getGridProperties().put("userName", testEnvironmentProperties.getUsername());
config.getGridProperties().put("accessKey", testEnvironmentProperties.getPassword());
final String buildId = StringUtils.isBlank(System.getenv("BUILD_NUMBER")) ? "local run" : System.getenv("BUILD_NUMBER");
config.getGridProperties().put("sessionName", testClassInstance.getClass().toString());
config.getGridProperties().put("sessionName", testClassInstance instanceof String ? testClassInstance : testClassInstance.getClass().toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

Question @oomelianchuk this line has nothing to do with the ticket, but seems to be a bugfix? Or even more general, what is the testClassInstance? I checked and it is only called in one place where we hand over the test name.
So basically:

  1. would it make sense to just pass the testName as a string?
  2. the parameter is not part of the javaDoc, we need to change that.

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.

Improvement: Enable passing credentials for Browserstack via environmental variables for better use in CI/CD
3 participants