theintern / intern-tutorial

Learn how to use Intern by following this tutorial!
http://theintern.io
144 stars 44 forks source link

BrowserStack host needed in tunnelOptions? #28

Open oyvindeh opened 8 years ago

oyvindeh commented 8 years ago

I tried to run the tutorial code towards BrowserStack, but nothing happened after the tunnel was created. No session appeared in the BrowserStack session interface. However, after adding host to tunnelOptions, it worked:

tunnelOptions: {
    username: '<your username>',
    accessKey: '<your access key>',
    host: 'hub.browserstack.com'
},

Perhaps the tutorial needs to be updated, or is this related to account type or something?

sholladay commented 8 years ago

The best solution to this is to make sure tunnelOptions is undefined. Intern will do the correct thing in that situation. And the easiest solution to that is usually to not specify tunnelOptions at all.

If/when you need to have a username or access key, you should set those via environment variables and not in your config file. Consider tunnelOptions a last resort.

That said, I think the problem here is that when you do put tunnelOptions in, it won't merge that object with its defaults. It is sort of all or nothing.

beerendlauwers commented 8 years ago

I had the same issue - adding the host key resolved the issue for me as well.

balmyBanzai commented 8 years ago

Is this still considered an open bug, or working as intended? Or, working as intended and could use a documentation update?

mlynn1402 commented 7 years ago

Adding the following code to the "intern.js" config file, got my tests running as required

tunnel: 'BrowserStackTunnel',

tunnelOptions: {
    username: '<your username>',
    accessKey: '<your access key>',
},

N.B. The username and accessKey can be found on the BrowserStack website, after creating account and navigating to

https://www.browserstack.com/accounts/settings

At the bottom of the page is a section called "Automate"