-
Notifications
You must be signed in to change notification settings - Fork 98
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
Tunnel to Saucelabs closes quickly and does not run tests #150
Comments
Hiya, I'm just guessing that you haven't added the self-reporting javascript to your test page. Check out examples on the README. Basically, the plugin now uses the Sauce Unit Test API, which requires the js on your page to expose the test results to a global variable, for our servers to pick up on. Feel free to email me or post your sauce username here, and I can try to figure out what else could be going wrong. |
Ah, so I realized one issue I had was that I didn't update my Saucelabs key after getting it reset :) Now the tests seem to run, but one interesting thing is that the tests tell me they all pass (which is correct after looking at the tests!), but in Saucelabs, I get the following error for every test:
Any idea what is going on there? Could it be because I'm running 16 concurrent? |
Do the tests report as passing on the command-line for grunt-saucelabs? |
I added the following snippet in my index.html file in the head:
|
Are you still having this issue? Any ideas? Can you give any more information? A link to a job page would be useful. |
Hey @Jonahss, it actually turns out that I had an old API key set, which is why the tests weren't getting kicked off in the first place. Turns out I can still use 4.0.4 to run the tests! I've still had issues with using the latest version of grunt-saucelabs where all of my tests were timing out, but since I haven't had to upgrade I haven't dove too deep. As for what to do about this ticket - it would have been super helpful to have an error message pop up when I had that old API key. Also if you'd like I could try to upgrade to the latest version of grunt-saucelabs to see why I'm having issues. |
Yeah, it'd be useful to find out what's going wrong with your tests. There's definitely better error handling needed. I tried to launch tests On Tue, Aug 5, 2014 at 11:12 AM, Shawn Jansepar [email protected]
|
Yesterday I experienced the same symptom with another reason. It was because I used MAC OSX 10.6.8 where Sauce Tunnel 4.3 can't run (bin/sc is terminated with a single log: 'Illegal Instruction'). FYI, I required the support team to mention each OS's min version and they accepted. |
I'm getting this as well. I have a simple hello world qunit, I'm getting success on the CLI but not in the saucelabs console/dashboard (say's Test exceeded maximum duration after 180 seconds): grunt tests
Running "connect:sauce" (connect) task
Started connect web server on http://localhost:9999
Running "saucelabs-qunit:all" (saucelabs-qunit) task
=> Starting Tunnel to Sauce Labs
>> Connected to Saucelabs
1 / 3 tests started
2 / 3 tests started
3 / 3 tests started
Tested http://localhost:9999/js/tests/index.html
Platform: Windows 8.1,chrome,31
Passed: true
Url https://saucelabs.com/jobs/682002726817400195c4adf7f5294980
Tested http://localhost:9999/js/tests/index.html
Platform: OS X 10.8,safari,6
Passed: true
Url https://saucelabs.com/jobs/c119a8b9f0054d20bb1b399a93c15bd4
Tested http://localhost:9999/js/tests/index.html
Platform: OS X 10.6,firefox,25
Passed: true
Url https://saucelabs.com/jobs/d3f44ec65df04927974ec01bfc6f28e9
>> All tests completed with status true
=> Stopping Tunnel to Sauce Labs Saucelabs dashboard: And here I believe I've used the QUnit.done(function (test_results) {
var tests = [];
for(var i = 0, len = log.length; i < len; i++) {
var details = log[i];
tests.push({
name: details.name,
result: details.result,
expected: details.expected,
actual: details.actual,
source: details.source
});
}
test_results.tests = tests;
window.global_test_results = test_results;
});
QUnit.testStart(function(testDetails){
QUnit.log(function(details){
if (!details.result) {
details.name = testDetails.name;
log.push(details);
}
});
});
test( "hello test", function() {
ok( 1 == "1", "Passed!" );
}); Deps in package.json: "devDependencies": {
"grunt-autoprefixer": "^0.8.1",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-qunit": "^0.5.2",
"grunt-contrib-sass": "^0.7.4",
"grunt-contrib-watch": "^0.6.1",
"grunt-saucelabs": "^8.3.2"
} |
Did you add the snippet for |
@jansepar I appreciate you chiming in with the suggestion! Unfortunately, I don't think that's my issue: /*
* Saucelabs
* Requires environment variables set e.g. export SAUCE_USERNAME=XX; export SAUCE_ACCESS_KEY=XX
*
*/
'saucelabs-qunit': { //DO NOT CHANGE NAME
all: {
options: {
build: process.env.TRAVIS_JOB_ID,
concurrency: 3,
tunnelTimeout: 5,
urls: ['http://localhost:9999/js/tests/index.html'],
testname: 'Buttons Sauce Unit Tests',
browsers: [
{
browserName: 'safari',
version: '6',
platform: 'OS X 10.8'
},
{
browserName: 'firefox',
version: '25',
platform: 'OS X 10.6'
},
{
browserName: 'chrome',
version: '31',
platform: 'Windows 8.1'
}
]
}
}
} So I just set my creds via |
Can you send a link to the job on Saucelabs? On Sat, Sep 27, 2014 at 6:29 PM, Rob Levin [email protected] wrote:
|
My bad. I played this job: And noticed a failure for This is called from: QUnit.log(function(details){
if (!details.result) {
details.name = testDetails.name;
//THIS IS TOP OF ERROR STACK
log.push(details);
}
}); And I resolved it by copying the two lines from you're snippet example which I must have screwed up on and omitted 👎 var log = [];
var testName; Now they're passing. Apologies for bogus bug and thanks for the library. I swear that when I played the video through the other day it was just passing and then hanging. In any event, only thing I suppose could be better is that an error in the test shouldn't result in the |
Awesome, glad you got it fixed. On Mon, Sep 29, 2014 at 1:07 PM, Rob Levin [email protected] wrote:
|
@Jonahss These days I experienced this issue occasionally. As you can see the second log, the test did pass in some browsers. Therefore, I think configuration is not issue. Is there any other cause for this? https://travis-ci.org/vibe-project/vibe-javascript-client/builds/43790766#L256-L258 Here is saucelabs-mocha config: |
I recently upgraded to grunt-saucelabs 8.1.1 because the previous version (4.0.4) I was running seems to no longer be compatible with the Saucelabs endpoint. Unfortunately, I can no longer seem to get my tests up and running. The output for me looks like the following:
I tried adding
onTestComplete
to my config, but that didn't seem to change anything. Help would be much appreciated, as this is probably my favorite/most useful grunt plugin :)The text was updated successfully, but these errors were encountered: