I am trying to run my test using TravisCI with browserstack add-on. Test cases are written in codeception.
Now, I am able to successfully define a secure key in travis.yml for browserstack addon but acceptance.suite.yml file also requires a username and access key under capabilities. How to define that value in a secure format in a similar way we defined in travis.yml?
The reference document also shows username and access key used in the plain text in host url. But I need those values in secure from.
One thing I can do it by creating env variable in travis file but I dont understand how do I access those variables? Each time it gaves me an error -
[Facebook\WebDriver\Exception\UnknownServerException] Invalid username or password
Below is my add-on setting for Browserstack in Travis file.
addons: browserstack:
username: "username"
access_key:
secure: "secure-key"
Now, acceptance.suite.yml file also needs the credential but I need to keep those secret.
class_name: AcceptanceTester
modules:
enabled:
- \Helper\Acceptance
- WPWebDriver
config:
WPWebDriver:
host: 'hub-cloud.browserstack.com'
port: 80
browser: 'firefox'
url: 'http://localtest.me'
adminUsername: ''
adminPassword: ''
adminPath: '/wp-admin'
capabilities:
'browserstack.user': 'username'
'browserstack.key': 'I NEED SECURE KEY HERE'
'os': 'OS X'
'os_version': 'sierra'
'browserstack.debug': 'true'
'build': 'Build_01'
'project': 'Automated_1'
'browserstack.local': 'true'
Any help would appreciated.