Giter VIP home page Giter VIP logo

grunt-saucelabs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-saucelabs's Issues

Support for "X-latest" Browser Versions

Thanks for this super-awesome plugin!

With auto-updating browsers like FireFox and Chrome releasing new major versions so frequently, it's hard to keep up with sauce configurations like this, which support the latest 2 releases:

{
  browserName: "firefox",
  version: "22",
  platform: "XP"
},
{
  browserName: "firefox",
  version: "21",
  platform: "XP"
}

Since SauceLabs knows what the latest version # of a browser is, It would be great if we could write our configurations like this:

{
  browserName: "firefox",
  version: "latest",
  platform: "XP"
},
{
  browserName: "firefox",
  version: "latest-1",
  platform: "XP"
}

Then we wouldn't have to rush to update our configuration every time a new major release happened.

Improve error message when SAUCE_ACCESS_KEY or SAUCE_USERNAME is not set

When running saucelabs-mocha and SAUCE_ACCESS_KEY or SAUCE_USERNAME is not defined, the task fails without telling the user what is wrong:

$ grunt test

Running "connect:server" (connect) task
Started connect web server on 127.0.0.1:9999.

Running "saucelabs-mocha:all" (saucelabs-mocha) task
=> Connecting to Saucelabs ...
Warning: Task "saucelabs-mocha:all" failed. Use --force to continue.

Aborted due to warnings.

The task should print a helpful error message instead:

Running "saucelabs-mocha:all" (saucelabs-mocha) task
=> Connecting to Saucelabs ...
Authorization failed, make sure you have correctly
set SAUCE_USERNAME and SAUCE_ACCESS_KEY.

Option for enabling detailed Error Output

first i have to thank you for your grunt-plugin, which we are planning to use for our jasmine-tests. great effort!

we need the detailed error results (in case some tests fail). for jasmine reading the results is kind of easy (jasmine just outputs failing test-results).

i made a settable option (detailedError), made this available for the qunit and the jasmine-runner. even though the qunit log isnt that meaningful, it could still help.

i will create a pull request (issue #24)

More compact 'browsers' object

Hey Parashuram,

What do you think about supporting a more compact browsers object, rather than having to explicitly list out every combination of browserName/platform/version?

For example: https://github.com/jstayton/jquery-marcopolo/blob/master/grunt.js#L103

I wrote that helper function because my project tests against almost all browsers, which ended up creating a huge array of different combinations. The compact style is much more manageable in my opinion.

Let me know what you think. Thanks!

Public option?

It seems the public option is not working. I have a private sauce account. So by default my test are private.

When I pass

'public':'public',
build: new Date,

In the grunt config the build works, but the public option is ignored. Is this an issue with the plugin or saucelabs?

Mocha support?

Not sure how hard this would be, but I think that a lot of people are gravitating toward Mocha because of its flexible API and its nice handling of async stuff, and I know I'd love to see it be easier to run Mocha tests on Saucelabs :)

Pass framework parameter for unit testing results on page

Certain ports failing when running grunt-saucelabs

I had an issue where a number of my tests weren't running on certain browsers with the following error:

Could not read test result for Error: Error response status: 7

The error happened on these browsers:

  • Mac 10.6::ipad(4.3)
  • Windows 2012::internet explorer(10)
  • Mac 10.6::ipad(4.3)
  • Mac 10.6::ipad(5)
  • Mac 10.6::iphone(4.3)
  • Mac 10.6::ipad(5)
  • Mac 10.6::iphone(5)
  • Linux::android(4)

But always successfully ran the tests for the following browsers:

  • Windows 2008::chrome
  • firefox(18.0)

I was initially very confused because I had another project I was using grunt-saucelabs with that was working just fine, using the same browsers. The only difference was port 3000 and port 3003 - I tried switching from 3003 to 3000, all of my tests started running again! Didn't dig too deep into why this was happening, but filing it anyways.

Use Release Tab to document release history

Would be a big help to see a high-level summary of changes from version-to-version, especially when it comes to potentially breaking changes, or new APIs available.

Thanks!

Edit Changed from recommending README section to releases tab, per @nschonni 's suggestion below.

Can't execute jasmine specs in jasmine-1.2.0

What version of jasmine does grunt-saucelabs work with?

I'm using the standard jasmine-html.js reporter with jasmine 1.2.0 and I'm getting the following exception:

Starting Jasmine tests
Fetched test result element, waiting for text inside it to change to complete

/Users/smithclay//node_modules/grunt-saucelabs/node_modules/wd/lib/webdriver.js:70
                var messageMatch = value.match(/([^\n]+)\nCommand duration/);
                                         ^
TypeError: Cannot call method 'match' of null
    at Object.<anonymous> (/Users/smithclay//node_modules/grunt-saucelabs/node_modules/wd/lib/webdriver.js:70:42)
    at Object.stringify (native)
    at /Users/smithclay//node_modules/grunt-saucelabs/node_modules/wd/lib/webdriver.js:65:31
    at Error.webdriver._newError.err.inspect (/Users/smithclay//node_modules/grunt-saucelabs/node_modules/wd/lib/webdriver.js:92:9)
    at formatValue (util.js:197:25)
    at inspect (util.js:125:10)
    at Object.exports.format (util.js:50:20)
    at Object.exports.log (console.js:25:36)
    at module.exports.TestRunner.jasmineRunner (/Users/smithclay//node_modules/grunt-saucelabs/tasks/saucelabs.js:204:16)
    at webdriver._callbackWithData (/Users/smithclay/Dropbox/Work/server/node_modules/grunt-saucelabs/node_modules/wd/lib/webdriver.js:193:29)

It seems like this is because webdriver is trying to get the element text of an element on the page that doesn't exist. Here's the saucelabs raw log output:

17:42:47.427 INFO - Executing: [get text:  null] at URL: /session/1354326154480/element//text)
17:42:47.427 WARN - Exception thrown
java.lang.NullPointerException
    at org.openqa.selenium.remote.server.handler.GetElementText.call(GetElementText.java:30)
    at org.openqa.selenium.remote.server.handler.GetElementText.call(GetElementText.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
17:42:47.434 WARN - Exception: null

Mysterious Intermittent Failures on TravisCI

Every so often, this plugin fails on Travis, with no particular error:

Running "saucelabs-mocha:all" (saucelabs-mocha) task
Verifying property saucelabs-mocha.all exists in config...OK
File: [no files]
=> Connecting to Saucelabs ...
Warning: Task "saucelabs-mocha:all" failed.� Use --force to continue.
Aborted due to warnings.
npm ERR! weird error 3
npm ERR! not ok code 0
The command "npm test" exited with 1.
Done. Your build exited with 1.

Here is the build URL:
https://travis-ci.org/ModelN/backbone.geppetto/builds/12358997

Perhaps it was a temporary connectivity issue with SauceLabs? I'd like to run this task as a prerequisite for every pull request on my projects, if possible.

Thanks for any help or advice!

Mocha runner does not support pending tests

In my project I got some pending tests (tests that I didn't have time to write yet):

6thv

They make the tasks nastily fail:

...
Running "saucelabs-mocha:all" (saucelabs-mocha) task
=> Connecting to Saucelabs ...
>> 2013-09-24 20:25:20.006:INFO::jetty-7.x.y-SNAPSHOT
>> 2013-09-24 20:25:20.035:INFO::Started [email protected]:55564
>> 2013-09-24 20:25:52.313:INFO::jetty-7.x.y-SNAPSHOT
>> 2013-09-24 20:25:52.315:INFO::Started [email protected]:4445
>> Connected to Saucelabs
Fatal error: Cannot read property '1' of null

Publish 2.0.3 to npm

Seems like your latest release isn't up on NPM!

Error: version not found: 2.0.3 : grunt-saucelabs/2.0.3

Setting build ID and test pass/fail status

Hey Parashuram,

This has been working great for me — thanks for your work on it!

Question: Is there a way to send the build ID and set the test pass/fail status? Looking at the Sauce Labs Test Dashboard, that's information that would be really handy to see.

Thanks!

Error response status: 7

Hello!

This plugin is awesome, but I'm running into an intermittent issue when trying to run my mocha tests on SauceLabs.

When I run locally, sometimes the tests pass and other times they fail in random places:

>> Connected to Saucelabs


Tested http://localhost:9001/specs/index.html
Environment: Backbone.Geppetto
>> Result: passes: 43failures: 0duration: 0.59s
Test Video: http://saucelabs.com/tests/ef93cc00e98042eea9f2b99d8ce872f4


Tested http://localhost:9001/specs/index.html
Environment: Backbone.Geppetto
>> Result: passes: 43failures: 0duration: 0.48s
Test Video: http://saucelabs.com/tests/4962d37ed3e8481faddd39494a3de619


Tested http://localhost:9001/specs/index.html
Environment: Backbone.Geppetto
>> Result: passes: 43failures: 0duration: 0.23s
Test Video: http://saucelabs.com/tests/842ab16a911d44aeb5fbdd51f5537bf1


Tested http://localhost:9001/specs/index.html
Environment: Backbone.Geppetto
>> Result: passes: 43failures: 0duration: 0.54s
Test Video: http://saucelabs.com/tests/2d36313c003045c2adf379f42d2d9585


Tested http://localhost:9001/specs/index.html
Environment: Backbone.Geppetto
>> Result: passes: 43failures: 0duration: 0.24s
Test Video: http://saucelabs.com/tests/f4219406ccfc492890a337def7174ce8


Tested http://localhost:9001/specs/index.html
Environment: Backbone.Geppetto
>> Result: passes: 0failures: 0duration: 0s
Test Video: http://saucelabs.com/tests/9c21a53bdccc4003b1065e496bf0b550
>> [Backbone.Geppetto] Could not read test result for Error: Error response status: 7.  http://localhost:9001/specs/index.html
>> [Backbone.Geppetto] More details at http://saucelabs.com/tests/http://localhost:9001/specs/index.html
Fatal error: Cannot read property '2' of undefined

I also tried running the tests on Travis-CI and got a similar problem. See: https://travis-ci.org/ModelN/backbone.geppetto/builds/11800015

Any ideas would be much appreciated!

Jasmine tests don't get marked as passed

I've been trying to get my CI working again and after fixing up against some changes to the task usage I my Jasmine tests don't seem to finish.

Here's my build job and each time my Source Labs connection times out. I've looked at Source Labs and the jobs aren't getting marked as passed or fail set on them, which means that the task just times out.

I've setup with the jsrunner but still that doesn't seem to have helped, I'm not sure if I've missed something else on the task setup.

Add support for jasmine 2

jasmine-jsreporter doesn't seem to support jasmine 2.0.0 yet, but @sclevine submitted a PR which seems to have done most of the heavy lifting - see detro/jasmine-jsreporter#7

I can get sauce running the tests by including the modified jasmine-jsreporter inside our Gruntfile's grunt-contrib-jasmine vendor section, which overwrites the JSReporter from grunt-saucelabs, and namespaces window.jasmine.getJSReport().

The screencast then says "625 specs, 0 failures, 9 pending specs" and is green/passing, and the selenium log says all suites and specs are passing, however sauce (or grunt-saucelabs?) is saying the tests haven't passed. Going to the JSUnitTest tab on the sauce job however tells me Jasmine run on Sauce failed: 0 total: 0 passed: 0, finished in s, and Passing 0 tests.

Is Jasmine 2 support on the grunt-saucelabs roadmap? If so what are the blockers currently?

Make test intervals configurable

Currently, the tests are checked for completion every 5000 milli seconds. This could be also be a configuration value passed to the test suite.

Please bump version and publish npm package

grunt-saucelabs has evolved a lot since last npm publish: bug fix and so. But if nobody does a version-bump and a publish, grunt-saucelabs package will be buggy for ever.

Dynamic 'testname' option

I noticed that if you do not set the options.testname optional parameter, the output will include the proper operating system and browser (http://cl.ly/image/0e3I3D3Q3j19) while rendering the web-based output's 'session' column with "unnamed job" (http://cl.ly/image/1A2M1d0f3n3Q). Is there a way to add that as a variable to be interpolated by saucelabs (Example: "My Project: #{TEST_ENVIRONMENT}") while maintaining both the console output and web-based session column?

retry logic for test timeouts? [bounty: $300]

So, testInterval's description alludes to there being retry logic, but no retrying actually seems to take place:

Running "saucelabs-qunit:all" (saucelabs-qunit) task
=> Connecting to Saucelabs ...
>> 2014-01-17 01:34:07.169:INFO::jetty-7.x.y-SNAPSHOT
>> 2014-01-17 01:34:07.197:INFO::Started [email protected]:49843
>> 
>> 2014-01-17 01:35:05.935:INFO::jetty-7.x.y-SNAPSHOT
>> 2014-01-17 01:35:05.939:INFO::Started [email protected]:4445
>> Connected to Saucelabs

[...other successful tests...]

Tested http://127.0.0.1:3000/js/tests/index.html
Environment: OS X 10.9::chrome
>> Timeout, waited for more than 300000 milliseconds
>> All tests completed with status false
=> Killing tunnel d04fee418fb94166a98e4afceacbfbf4
Warning: Task "saucelabs-qunit:all" failed.� Use --force to continue.

(OS X Chrome 31 seems to be flaky lately for some reason.)

[Edit: Okay, so what I'm really looking for is a "have each test (page+browser combo) timeout after X amount of time and retry each timed-out/failed test up to N times" feature.]

"chrome" or "googlechrome" for browser?

I see in the Gruntfile of this repository that it uses "googlechrome".

On https://saucelabs.com/docs/browsers I see "chrome" in the webdriver/nodejs documentation, and "googlechrome" in the selenium/json documentation.

I see that this grunt plugin is using webdriver, so I figured it should be "chrome", right?

Or does both work and is the documentation at saucelabs simply confusing?

Support "files" objects in addition to "urls"

Rather than repeating the host/port combination in the urls object, what about supporting the default Grunt multiTask files object.

'saucelabs-qunit': {
  all: {
      options: {
        host: 'http://localhost',
        port: 8000,
        // rest of the regular config
      }
      src: [ 'test1.html', 'test2.html'}
    }
  }
}

This would then just iterate over the files object and build up the current options.urls array

Don't run saucelabs for pull requests, just run jshint

Saucelabs tests cannot be run since the saucelabs key and value are not available. Just need to run jshint for pull requests. All pull requests need to be sent to incoming-pr branch that will then run the saucelabs tests.

support local testing via phantomjs or generic browser

since grunt-saucelabs has, probably, the best WD runners for js test frameworks, maybe we should implement the optional local test runner on local browsers (if SAUCE_USERNAME is empty and username is empty, for example)

Error: Fatal error: Cannot read property '_' of undefined

Running my tests auto-magically on Sauce Labs through Grunt would be awesome. Unfortunately, I seem to be running into an issue after the connection is established:

2013-01-18 15:21:20,940 - Connected! You may start your tests.
Fatal error: Cannot read property '_' of undefined

This also happens even if I enter wrong configuration information (empty API key):

=> Sauce Labs Tunnel disconnected  3
Fatal error: Cannot read property '_' of undefined

I'm guessing this may be an issue with my version of Grunt - I'm on grunt v0.4.0rc6, and grunt-contrib-qunit 0.1.1rc6.

Would love to get some feedback on this!

Test did not see a new command for XXX seconds. Timing out. Tests fails.

I keep getting a timed out message from saucelabs for modern browsers:

{"browserName": "internet explorer","platform": "Windows 7","version": "9"},
{"browserName": "firefox","platform": "OS X 10.6"},
{"browserName": "chrome","platform": "Windows XP"}

The test runs: https://saucelabs.com/tests/82f5c00caa10443ca80e3b20e68570b4

I committed a ticket to them asking if this was an issue on there side. They responded and said that it was not.

The output from the console is:

Environment: Unit Tests

Timeout, waited for more than 300000 milliseconds
All tests completed with status false
Warning: Task "saucelabs-mocha:all" failed. Use --force to continue.

Can you guys help me understand if this is an issue with the plugin or my configuration?

thanks, cody

Use QUnit's callbacks

QUnit provides callbacks like QUnit.done that can be used instead of querying the DOM for result elements, assuming the driver allows execution of arbitrary code along with a callback mechanism.

Problem with Android 4.0?

I'm using grunt-saucelabs v4.1.2 in a grunt project.

Gruntfile.js:

var browsers = [
  ...
    { browserName: "android", platform: "Linux", version: "4.0" }
];

grunt.initConfig({
  ...
  saucelabs-qunit': {
        all: {
            options: {
                username: 'iris-js',
                key: process.env.SAUCE_ACCESS_KEY,
                urls: ["http://localhost:8080/test/iris.html"],
                tunnelTimeout: 5,
                build: process.env.TRAVIS_JOB_ID,
                concurrency: 3,
                browsers: browsers,
                testname: "qunit tests from saucelabs"
            }
        }
    }
});

When I run SAUCE_ACCESS_KEY=*** grunt test-saucelabs, It only fails on Android tests... Saucelabs screencast shows a blank screen: 'HTTP ERROR 404'. In other platforms (Linux, Windows, iOS, OS X...) all goes well...

There are exceptions in the selenium log:

...
java.lang.UnsupportedOperationException: Window handling not supported on Android
...
org.openqa.selenium.NoSuchElementException: Could not find element with id: qunit-testresult

Why does tests only fail with Android? I'm trying to find a solution but I cannot find it... What am I doing wrong?

Thanks in advance

Mocha in grunt

I would actually love to be able to use this with mocha, re #4.

Tests fail when ENV vars for username / key don't match grunt options

Hi, I had a personal saucelabs account and I set the username & key in the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables and everything works when I run the grunt saucelabs task.

Then created an open source account and set the new username and key in my Gruntfile.js without changing my environment variables. After this, all of my tests started failing like so:

>> [SwfStore] Could not initialize browser for session undefined { browserName: 'internet explorer',

And the tests never even appeared in my account page on the saucelabs website.

However, everything passed when I re-ran the tests like so:

 $ SAUCE_USERNAME=new_username SAUCE_ACCESS_KEY=new_key grunt test

So I think some part of grunt-saucelabs code is using the ENV variables, even when the grunt options have a username and key set.

Here's the full output:

$ grunt test
Running "saucelabs-jasmine:all" (saucelabs-jasmine) task
=> Connecting to Saucelabs ...
>> 2013-12-17 12:47:45.627:INFO::jetty-7.x.y-SNAPSHOT
>> 2013-12-17 12:47:45.683:INFO::Started [email protected]:52243
>> 2013-12-17 12:48:35.790:INFO::jetty-7.x.y-SNAPSHOT
>> 
>> 2013-12-17 12:48:35.794:INFO::Started [email protected]:4445
>> Connected to Saucelabs
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'internet explorer',
>>   version: '11',
>>   platform: 'Windows 8.1',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[33mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'internet explorer',
>>   version: '10',
>>   platform: 'Windows 8',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[36mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'internet explorer',
>>   version: '9',
>>   platform: 'Windows 7',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[35mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'internet explorer',
>>   version: '8',
>>   platform: 'Windows XP',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[34mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'internet explorer',
>>   version: '7',
>>   platform: 'Windows XP',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[32mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'internet explorer',
>>   version: '6',
>>   platform: 'Windows XP',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[31mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'firefox',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[33mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'chrome',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[36mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'safari',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[35mSwfStore\u001b[39m' }
>> [SwfStore] Could not initialize browser for session undefined { browserName: 'opera',
>>   tags: [],
>>   name: 'SwfStore',
>>   build: undefined,
>>   'tunnel-identifier': '156534453',
>>   prefix: '\u001b[34mSwfStore\u001b[39m' }
>> All tests completed with status false
=> Killing tunnel 46f347c9a97a4d3f88b21c13b57bd0d0
Warning: Task "saucelabs-jasmine:all" failed. Use --force to continue.

Aborted due to warnings.

Here's the sauce_connect.log from a failing run, in case it helps:

2013-12-17 12:47:45,714 - sauce_connect:558 - INFO - / Starting \
2013-12-17 12:47:45,721 - sauce_connect:559 - INFO - Please wait for "You may start your tests" to start your tests.
2013-12-17 12:47:45,733 - sauce_connect:571 - DEBUG - System is -4.0 hours off UTC
2013-12-17 12:47:45,734 - sauce_connect:573 - DEBUG - options: {'user': 'jsfc', 'ports': ['52243'], 'domains': None, 'debug_ssh': False, 'tunnel_ports': ['80'], 'allow_unclean_exit': False, 'rest_url': 'https://saucelabs.com/rest/v1', 'logfile': 'sauce_connect.log', 'squid_opts': '', 'ssh': False, 'se_port': '4445', 'readyfile': None, 'shared_tunnel': False, 'boost_mode': True, 'tunnel_identifier': '156534453', 'ssh_port': 443, 'fast_fail_regexps': '', 'direct_domains': '', 'host': '127.0.0.1', 'quiet': False, 'latency_log': 150, 'use_ssh_config': False}
2013-12-17 12:47:45,736 - sauce_connect:574 - DEBUG - metadata: {'PythonVersion': '2.5.1', 'OwnerHost': '127.0.0.1', 'Release': '3.0-r28', 'OwnerPorts': ['52243'], 'Ports': ['80'], 'Platform': 'Java-1.6.0_65-Java_HotSpot-TM-_64-Bit_Server_VM,_20.65-b04-462,_Apple_Inc.-on-Mac_OS_X-10.9-x86_64', 'Build': '43', 'ScriptRelease': 43, 'ScriptName': 'sauce_connect'}
2013-12-17 12:47:45,737 - sauce_connect:576 - INFO - Forwarding: None:['80'] -> 127.0.0.1:['52243']
2013-12-17 12:47:45,752 - sauce_connect:375 - INFO - Succesfully connected to local server 127.0.0.1:52243 in 5ms
2013-12-17 12:47:46,698 - sauce_connect:238 - INFO - {"squid_config":null,"use_caching_proxy":true,"metadata":{"PythonVersion":"2.5.1","OwnerHost":"127.0.0.1","Release":"3.0-r28","OwnerPorts":["52243"],"Ports":["80"],"Platform":"Java-1.6.0_65-Java_HotSpot-TM-_64-Bit_Server_VM,_20.65-b04-462,_Apple_Inc.-on-Mac_OS_X-10.9-x86_64","Build":"43","ScriptRelease":43,"ScriptName":"sauce_connect"},"use_kgp":true,"tunnel_identifier":"156534453","shared_tunnel":false,"fast_fail_regexps":null,"ssh_port":443,"direct_domains":null,"domain_names":[]}
2013-12-17 12:47:54,276 - sauce_connect:250 - INFO - Tunnel remote VM is provisioned (46f347c9a97a4d3f88b21c13b57bd0d0)
2013-12-17 12:47:54,891 - sauce_connect:268 - INFO - Tunnel remote VM is booting ..
2013-12-17 12:48:35,663 - sauce_connect:272 - INFO - Tunnel remote VM is running at maki76236.miso.saucelabs.com
2013-12-17 12:48:35,677 - sauce_connect:375 - INFO - Succesfully connected to local server 127.0.0.1:52243 in 1ms
2013-12-17 12:48:35,681 - sauce_connect:646 - INFO - Starting connection to tunnel host...
2013-12-17 12:48:35,684 - sauce_connect:646 - INFO - Connecting to tunnel host maki76236.miso.saucelabs.com as jsfc
2013-12-17 12:48:35,786 - sauce_connect:646 - INFO - Forwarding Selenium with ephemeral port 52256
2013-12-17 12:48:35,796 - sauce_connect:646 - INFO - Selenium HTTP proxy listening on port 4445
2013-12-17 12:48:36,486 - sauce_connect:0 - INFO - Successful handshake with Sauce Connect server
2013-12-17 12:48:36,601 - sauce_connect:0 - INFO - Tunnel host version: 0.1.0, remote endpoint ID: 477c14f9c94943a5b96bb0cc60bc9fb9
2013-12-17 12:48:36,605 - sauce_connect:646 - INFO - Connected! You may start your tests.
2013-12-17 12:48:50,417 - sauce_connect:0 - INFO - received SIGTERM

saucelabs-mocha Error - Could not extract passes, failures, or duration from text TypeError: Cannot read property '1' of null

My tests run at saucelabs (via saucelabs-mocha), and all pass in the test runner (https://www.dropbox.com/s/3n5v6eqxlkwt1r8/Screenshot%202013-10-02%2012.51.44.png), but this is what I get in the command line.

Note133:UX360 tandemseven$ grunt saucelabs
Running "saucelabs-mocha:all" (saucelabs-mocha) task
=> Connecting to Saucelabs ...

Connected to Saucelabs
Error - Could not extract passes, failures, or duration from text TypeError: Cannot read property '1' of null
Fatal error: Cannot read property '2' of undefined

What am I doing wrong here?

Improve output of unit test failures

Right now when a test fails (with detailedErrors: true) ,grunt-saucelabs just dumps the entire qunit test results dom as a single string, coloured red, into the console. Which means a potentially very long list of test results is just outputted in bright red (test results of tests that succeeded as well as tests that failed).

It would be much more useful if it only outputted the results of failed tests, or at least distinguished between the two by color (or something).

Grunt 0.4 Release

I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.

If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.

If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8" as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0" to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.

Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.

Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!

If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.

Thanks, we really appreciate your work!

Saucelabs test URLs

Would be good to add the saucelabs URL to the log files, after the test has finished. IF there are failures, it would help look at the right test run.

Additionally, if there a way to make all test run URLs public ?

504 Gateway Time-out not handled properly

See https://travis-ci.org/twbs/bootstrap/jobs/17089345

Running "saucelabs-qunit:all" (saucelabs-qunit) task
=> Connecting to Saucelabs ...
=> Looks like there are existing tunnels to Sauce Labs, need to kill them. TunnelID:<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/0.7.62</center>
</body>
</html>
=> Killing tunnel <
=> Killing tunnel !
=> Killing tunnel D
=> Killing tunnel O
=> Killing tunnel C
=> Killing tunnel T

Expose browser object to callback

The browser object can be exposed to the callback so that the callback can get reports, or run additional diagnostics once a test is complete.

grunt-saucelabs-mocha Cannot read property '1' of null

I am trying the mocha example from your website https://saucelabs.com/docs/javascript-unit-testing-tutorial

And I get the following result:

gmoon:yummy-pasta gmoon$ grunt test
Running "connect:server" (connect) task
Starting connect web server on localhost:9999.

Running "saucelabs-mocha:all" (saucelabs-mocha) task
=> Connecting to Saucelabs ...
=> Looks like there are existing tunnels to Sauce Labs, need to kill them. TunnelID:a6efe879355247e8a9fb2db3fb8316f0
=> Killing tunnel a6efe879355247e8a9fb2db3fb8316f0
>> 2013-08-24 16:13:24.132:INFO::jetty-7.x.y-SNAPSHOT
>> 2013-08-24 16:13:24.165:INFO::Started [email protected]:57941
>>
>> 2013-08-24 16:14:09.664:INFO::jetty-7.x.y-SNAPSHOT
>>
>> 2013-08-24 16:14:09.668:INFO::Started [email protected]:4445
>> Connected to Saucelabs
Fatal error: Cannot read property '1' of null

This is due to an apparent change in the mocha.suite.total() result. The code is expecting to match this:

/passes: (\d*)failures: (\d*)duration: ([\d,.]*)s/

But the return value now contains a 'pending' section:

passes: 5pending: 0failures: 0duration: 0.02s

I created a pull request with a fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.