mmanela / chutzpah

Chutzpah is an open source JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha and TypeScript.
http://mmanela.github.io/chutzpah/
Apache License 2.0
550 stars 142 forks source link

Select what browser to use as default for running tests #319

Closed SuneRadich closed 9 years ago

SuneRadich commented 9 years ago

The Visual Studio plugin (https://github.com/mmanela/chutzpah/wiki/chutzpah-visual-studio-extensions) adds a right click option to run a test or test-folder in the browser. This works great.

However, I prefer to debug my front end in Chrome, because of its (IMHO) better debugging capabilities. Because of that, I would prefer to have the tests run in Chrome by default - and not Internet Explorer.

It would be nice to add a configuration option to set the default browser for running tests - or maybe add all system browers in the right click menu, so that you can select what browser you want launched for any given test.

mmanela commented 9 years ago

For me it uses Chrome since chrome is my default browser. Does this not happen for you?

bhab commented 9 years ago

Mine actually open in Chrome, I would like to use Internet Explorer (at this point). FYI, when I installed the extension, Chrome was my default browser. I have since changed IE to the default browser, but Open in Browser still uses Chrome. Do you think uninstalling the extension and reinstalling will "pick up" the default browser?

bhab commented 9 years ago

Problem Solved. The Chutzpah extension opens the test using the "default program" for the file extension .html that is set in Windows. In Windows 8, go to Control Panel > Programs > Default Programs, look for .html extension. Whatever program this is set to, will control what browser the test will be opened with. Mine was set to Chrome. I changed it to IE and now my tests open with IE.

SuneRadich commented 9 years ago

Ah, thanks bhab!

jmwolfe commented 8 years ago

This doesn't work for me. I have .html assigned to Chrome, but it opens it in IE anyways. Any other ideas?

ghost commented 8 years ago

My default is Chrome. When I do "Open in browser" it opens in Chrome. When I do "Run Chutzpah With > Debugger" it tries to open in IE (and fails saying "0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'querySelector' "). Is there a way I can debug directly in Chrome?

mmanela commented 8 years ago

The integrated VS debugging functionality only works with IE. But if you open in browser you can debug directly in chrome with that HTML file.

TakeApps commented 7 years ago

I haven't been able to set another browser to debug but IE 11. When I try to run the test with the debugger, I get this error:

Unhandled exception at line 4870, column 17 in file:///C:/Users/Carlos/AppData/Local/Microsoft/VisualStudio/14.0/Extensions/dcgouuxl.edy/ChutzpahTestHarnessFiles/Coverage/blanket_jasmine_v2.js

0x800a138f - JavaScript runtime error: Unable to get property 'blanketSessionLoader' of undefined or null reference

Do you know what could be causing it?

mmanela commented 7 years ago

Can you share a repro of this?

devkeydet commented 6 years ago

I'm getting this same issue. The weird thing is that I can't repro if I put everything into a brand new visual studio solution.

devkeydet commented 6 years ago

See: https://github.com/mmanela/chutzpah/issues/629. Disabling code coverage seems to fix the 'blanketSessionLoader' issue.

jon-bowen commented 1 year ago

The integrated VS debugging functionality only works with IE. But if you open in browser you can debug directly in chrome with that HTML file.

Now that IE is out of support are there any plans to change this behaviour? Or will debugging js tests from within Visual Studio just become history?