Error starting test with testacular

I am testing angularjs tutorials on a 64-bit Windows 7 system because I find this structure very interesting from what I read on my home page. I am new to node.js and have not tested in Java-Script.

When running the tests, I get the following error. Can someone find out what the problem is, or give some clues on how to determine this? I have a new node installation and added testacular with

npm install -g testacular

which worked great with what was printed in the console window.

So here is the error message:

PS C: \ Users \ xx \ Documents \ Angular \ angular-phonecat>. \ Scripts \ test.bat
INFO [testacular]: Testacular server started with http and colon; // localhost & colon; 9876 /
INFO [launcher]: launch Chrome browser
ERROR [testacular]: {[Error: call ENOENT] code: "ENOENT", errno: "ENOENT", syscall: "spawn"}
Error: spawn ENOENT
in errnoException (child_process.js: 948: 11)
in Process.ChildProcess._handle.onexit (child_process.js: 739: 34)

+6
source share
2 answers

Short answer: Set env variable CHROME_BIN to the full path to chrome.exe

The msg error is confusing since the spawn behavior was changed in Node 0.10, we need to update it ( https://github.com/karma-runner/karma/issues/452 )

+9
source

Inserting "PhantomJS" for the test browser in the karma configuration file in Windows Vista led to the same error message: {[Error: spawn ENOENT] code: ENOENT, errno: ENOENT, syscall: 'spawn'}

I advertised the advice above and inserted PHANTOMJS_BIN in the "User Variables for Owner" section of the system path ("Ecological Variables") with a value consisting of a path including phantomjs.exe (C: \ Program Files \ phantomjs -1.9.0-windows \ phantomjs.exe)

All good jasmine angularjs tests work now and are much faster than with "Chrome" or "Firefox" as a test browser.

0
source

All Articles