Skip to content
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

Exception during the code coverage causes Testacular server to fail #365

Closed
manevpe opened this issue Feb 25, 2013 · 1 comment
Closed

Comments

@manevpe
Copy link

manevpe commented Feb 25, 2013

I'm also getting the same exception in this scenario - a browser is opened, tests are executed and browser is reported as idle, browser is closed. It seems like the browser is being closed before testacular was able to generate coverage report. As a result the Testacular server is stopped and mo report is generated.

INFO [Safari 4.0 (Linux)]: Connected on socket id 4AKeIcYaacVzrqc54ukG
INFO [Firefox 17.0 (Windows)]: Connected on socket id YDycVpivqNOHwVls4ukF
INFO [testacular]: Delaying execution, these browsers are not ready: Safari 4.0
(Linux)
Safari 4.0 (Linux) ERROR
Uncaught TypeError: Object [object Object] has no method '<method_name>'
at <path_to_file>:2
Safari 4.0 (Linux): Executed 0 of 4 ERROR (13.948 secs / 0 secs)
ERROR [testacular]: [TypeError: Cannot read property 'coverage' of null]
TypeError: Cannot read property 'coverage' of null
at CoverageReporter.onBrowserComplete (<path_to_file>\node_modules\testacular\lib\reporters\Coverage.js:65:21)
at EventEmitter.emit (events.js:126:20)
at Browser.onComplete (<path_to_file>\node_modules\testacular\lib\browser.js:76:13)
at Socket.EventEmitter.emit as $emit
at SocketNamespace.handlePacket (<path_to_file>\node_modules\testacular\node_modules\socket.io\lib\namespace.js:335:22)
at Manager.onClientMessage (<path_to_file>\node_modules\testacular\node_modules\socket.io\lib\manager.js:488:38)
at XHRPolling.Transport.onMessage (<path_to_file>\node_modules\testacular\node_modules\socket.io\lib\transport.js:387:20)
at XHRPolling.HTTPTransport.onData (<path_to_file>\node_modules\testacular\node_modules\socket.io\lib\transports\http.js:99:10)
at IncomingMessage.HTTPTransport.handleRequest.req.on.buffer (<path_to_file>\node_modules\testacular\node_modules\socket.io\lib\transports\http.js:69:12)
at IncomingMessage.EventEmitter.emit (events.js:93:17)

@vojtajina
Copy link
Contributor

Thanks, that's a bug in coverage plugin.

When there's an error in the browser, no coverage is sent back.

vojtajina added a commit that referenced this issue Mar 3, 2013
This is just a fix for stable, in the master I will change the implementation,
so that the "testacular" is responsible for sending the coverage results, 
rather than individual adapters.

Closes #365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants