1

Closed

JS Error: Timeout occured when executing test file

description

I am getting a timeout error when executing my tests and also the sample tests. It runs the tests correctly but before it completes it throws a JS Error and display 0 totals tests completed.
Here is the output running the Jasmine sample tests.
t:\Downloads\js>chutzpah.console.exe jasmineTests.html
Chutzpah console test runner (64-bit .NET 4.0.30319.18052)
Copyright (C) 2013 Matthew Manela (http://matthewmanela.com).

chutzpah.dll:     Version 2.4.3.281

File: t:\Downloads\js\jasmineTests.html
     4 total, 0 failed, took 0.01 seconds

JS Error: Timeout occured when executing test file
While Running:t:\Downloads\js\jasmineTests.html

=== 0 total, 0 failed, took 6.22 seconds ===
Closed Dec 4, 2013 at 3:15 PM by mmanela
Fixed

comments

mmanela wrote Jul 30, 2013 at 3:15 PM

I am not able to reproduce your issue. When I run it on my box it passes fine on the sample tests.

Can you run with the /debug flag and give me the output? In addition, can you give me any other info that might help like your machine info?

dterza01 wrote Aug 1, 2013 at 12:09 AM

Matthew, This is the output with the /debug flag.
Chutzpah console test runner (64-bit .NET 4.0.30319.18052)
Copyright (C) 2013 Matthew Manela (http://matthewmanela.com).

chutzpah.dll:     Version 2.4.3.281

#_#FileStart#_# {"type":"FileStart"}
#_#TestStart#_# {"type":"TestStart","testCase":{"moduleName":"general","testName":"A basic test","testResults":[]}}
#_#TestDone#_# {"type":"TestDone","testCase":{"moduleName":"general","testName":"A basic test","testResults":[{"passed":true,"message":"Passed.","stackTrace":null},{"passed":true,"message":"Passed.","stackTrace":null}],"timetaken":11}}
Tests complete: 1#_#TestStart#_# {"type":"TestStart","testCase":{"moduleName":"stringLib","testName":"will get vowel count","testResults":[]}}
#_#TestDone#_# {"type":"TestDone","testCase":{"moduleName":"stringLib","testName":"will get vowel count","testResults":[{"passed":true,"message":"Passed.","stackTrace":null}],"timetaken":0}}
Tests complete: 2#_#TestStart#_# {"type":"TestStart","testCase":{"moduleName":"mathLib","testName":"will add 5 to number","testResults":[]}}
#_#TestDone#_# {"type":"TestDone","testCase":{"moduleName":"mathLib","testName":"will add 5 to number","testResults":[{"passed":true,"message":"Passed.","stackTrace":null}],"timetaken":0}}
Tests complete: 3#_#TestStart#_# {"type":"TestStart","testCase":{"moduleName":"mathLib","testName":"will multiply 5 to number","testResults":[]}} #_#TestDone#_# {"type":"TestDone","testCase":{"moduleName":"mathLib","testName":"will multiply 5 to number","testResults":[{"passed":true,"message":"Passed.","stackTrace":null}],"timetaken":0}}
Tests complete: 4#_#FileDone#_# {"type":"FileDone","timetaken":14,"passed":5,"failed":0}

File: t:\Downloads\js\jasmineTests.html
     4 total, 0 failed, took 0.01 seconds

JS Error: Timeout occured when executing test file
While Running:t:\Downloads\js\jasmineTests.html

=== 0 total, 0 failed, took 6.32 seconds ===
I'm running those tests on Win7 Ultimate SP1 x64 environment. (Lenovo W530 laptop)

mmanela wrote Aug 2, 2013 at 4:39 PM

Odd, and does this repro if you try on a different machine?

dterza01 wrote Aug 3, 2013 at 3:46 PM

I tried it on 3 machines and the error appeared on 2 of them (WIn 7 x64).
The Win 8 x64 ran just fine. I will dig in further to see if I can isolate the problem.

sllabres wrote Sep 25, 2013 at 12:45 PM

Hello,

I was having a problem with timeout exceptions and something sprang to mind about phantomjs. I believe it has issues running on intel on board graphics cards.

To fix this I change chutzpah and phantom js to run with a different graphics processor "high performance nvidia processor" instead of the default "Integrated graphics".

You can do this by right clicking on the exe -> "Run with graphics processor" -> "change default graphics processor" -> "Select program to customise" and add phantomjs.exe, selecting "High performance nvidia processor".

I also added chutzpah.console.exe to this but I'm not sure that's necessary.

I hope that helps!

Seb

mavtak wrote Dec 4, 2013 at 1:29 PM

Bonkers! sllabres' advice fixed my problem!

aL3891 wrote Feb 14 at 11:45 AM

weird error.. This solution works for me as well, this menu option is part of nvidia graphics drivers though, so amd users might have to select something diffrent..

saveliev wrote Mar 31 at 6:45 PM

There are several locations for phantomjs.exe - if you install from nuget and also install a right click extension you'll get two.
For the extension, the location is in
C:\Users\username\AppData\Local\Microsoft\VisualStudio\11.0\Extensions\q3ijlnnr.wav
that's VS2012 and last part could be different (so is used name).

silence150 wrote May 15 at 10:15 AM

@sllabres Thank you for the solution, and @saveliev thank you for the heads up about several installations!