Reputation: 856
I use the "testcafe-browser.provider-browserstack" plugin for TestCafé. I try to use this in my app, but I always get a message that the login is wrong. The data is right (just "test" for this post)
const createTestCafe = require('testcafe');
const BrowserStack = require("testcafe-browser-provider-browserstack");
let testcafe = null;
process.env.BROWSERSTACK_USERNAME="test";
process.env.BROWSERSTACK_PASSWORD="test";
createTestCafe('localhost', 1337, 1338)
.then(tc => {
testcafe = tc;
const runner = testcafe.createRunner();
return runner
.src(['tests/fixture1.js', 'tests/ingo1.js'])
.browsers('browserstack:Chrome')
//.browsers(['chrome'])
.screenshots('allure/screenshots/', true)
.reporter('allure')
.run();
})
.then(failedCount => {
console.log('Tests failed: ' + failedCount);
testcafe.close();
});
Upvotes: 2
Views: 383
Reputation: 6318
Please use the BROWSERSTACK_ACCESS_KEY
environment variable instead of BROWSERSTACK_PASSWORD
. Refer to the following article to get details
Upvotes: 6